Issue in archinstall.output.log() when the log file output is omitted. Now properly checks if a logfile is given, otherwise it ignores it.

This commit is contained in:
Anton Hvornum 2020-11-29 21:30:44 +00:00
parent 82e0d20738
commit 07e6e91f3c
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ def log(*args, **kwargs):
if type(kwargs['file']) is str:
with open(kwargs['file'], 'a') as log_file:
log_file.write(f"{orig_string}\n")
else:
elif kwargs['file']:
kwargs['file'].write(f"{orig_string}\n")
# If we assigned a level, try to log it to systemd's journald.