Don't crash on bad log path.
This commit is contained in:
parent
6c5be4e60a
commit
19f207ed42
@ -51,11 +51,12 @@ def run():
|
|||||||
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
|
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
|
||||||
log_source = libcalamares.job.configuration["srcLog"]
|
log_source = libcalamares.job.configuration["srcLog"]
|
||||||
log_destination = libcalamares.job.configuration["destLog"]
|
log_destination = libcalamares.job.configuration["destLog"]
|
||||||
|
|
||||||
# copy installation log before umount
|
# copy installation log before umount
|
||||||
if(os.path.exists('{!s}'.format(log_source))):
|
if(log_source)
|
||||||
shutil.copy2('{!s}'.format(log_source), '{!s}/{!s}'.format(
|
if(os.path.exists('{!s}'.format(log_source))):
|
||||||
root_mount_point, log_destination))
|
shutil.copy2('{!s}'.format(log_source), '{!s}/{!s}'.format(
|
||||||
|
root_mount_point, log_destination))
|
||||||
|
|
||||||
if not root_mount_point:
|
if not root_mount_point:
|
||||||
return ("No mount point for root partition in globalstorage",
|
return ("No mount point for root partition in globalstorage",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
scrLog: "/path/to/installation.log"
|
#scrLog: "/path/to/installation.log"
|
||||||
destLog: "/var/log/installation.log"
|
#destLog: "/var/log/installation.log"
|
||||||
# example when using the Calamares created log:
|
# example when using the Calamares created log:
|
||||||
#srcLog: "/root/.cache/Calamares/Calamares/Calamares.log"
|
#srcLog: "/root/.cache/Calamares/Calamares/Calamares.log"
|
||||||
#destLog: "/var/log/Calamares.log"
|
#destLog: "/var/log/Calamares.log"
|
||||||
|
Loading…
Reference in New Issue
Block a user