From 07e6e91f3cd49778168f693bcb52bc7b2a165c09 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 29 Nov 2020 21:30:44 +0000 Subject: Issue in archinstall.output.log() when the log file output is omitted. Now properly checks if a logfile is given, otherwise it ignores it. --- archinstall/lib/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall') diff --git a/archinstall/lib/output.py b/archinstall/lib/output.py index 8331a04c..3c1b12e2 100644 --- a/archinstall/lib/output.py +++ b/archinstall/lib/output.py @@ -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. -- cgit v1.2.3-54-g00ecf