mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-25 08:28:22 -04:00
[umount] Don't raise when copying log file fails.
This commit is contained in:
parent
6f7b5a0510
commit
2a0a2a26bc
1 changed files with 10 additions and 3 deletions
|
@ -55,11 +55,18 @@ def run():
|
||||||
"destLog" in libcalamares.job.configuration):
|
"destLog" in libcalamares.job.configuration):
|
||||||
log_source = libcalamares.job.configuration["srcLog"]
|
log_source = libcalamares.job.configuration["srcLog"]
|
||||||
log_destination = libcalamares.job.configuration["destLog"]
|
log_destination = libcalamares.job.configuration["destLog"]
|
||||||
|
# Relocate log_destination into target system
|
||||||
|
log_destination = '{!s}/{!s}'.format(root_mount_point, log_destination)
|
||||||
|
# Make sure source is a string
|
||||||
|
log_source = '{!s}'.format(log_source)
|
||||||
|
|
||||||
# copy installation log before umount
|
# copy installation log before umount
|
||||||
if os.path.exists('{!s}'.format(log_source)):
|
if os.path.exists(log_source):
|
||||||
shutil.copy2('{!s}'.format(log_source), '{!s}/{!s}'.format(
|
try:
|
||||||
root_mount_point, log_destination))
|
shutil.copy2(log_source, log_destination)
|
||||||
|
except Exception as e:
|
||||||
|
libcalamares.utils.debug("WARNING Could not preserve file {!s}, "
|
||||||
|
"error {!s}".format(log_source, e))
|
||||||
|
|
||||||
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",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue