index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-03-09 23:39:11 +0100 |
---|---|---|
committer | Anton Hvornum <anton@hvornum.se> | 2021-03-09 23:39:11 +0100 |
commit | e2aeb3a32faa397db899f4105a16f31a095387be (patch) | |
tree | 007129425274e4efee38622c8cf5f912074a5531 /archinstall/lib/output.py | |
parent | 48e9f13f0105e449c95e52672d1bf98e6e6b5d65 (diff) | |
parent | cfbaaedb17e9ad6975a5bb37095e2b4ebe8e6797 (diff) |
-rw-r--r-- | archinstall/lib/output.py | 11 |
diff --git a/archinstall/lib/output.py b/archinstall/lib/output.py index 956ad0c4..0e0a295b 100644 --- a/archinstall/lib/output.py +++ b/archinstall/lib/output.py @@ -5,6 +5,9 @@ import logging from pathlib import Path from .storage import storage +# TODO: use logging's built in levels instead. +# Altough logging is threaded and I wish to avoid that. +# It's more Pythonistic or w/e you want to call it. class LOG_LEVELS: Critical = 0b001 Error = 0b010 @@ -108,10 +111,10 @@ def log(*args, **kwargs): # In that case, we'll drop it. return None - try: - journald.log(string, level=kwargs['level']) - except ModuleNotFoundError: - pass # Ignore writing to journald + try: + journald.log(string, level=kwargs.get('level', LOG_LEVELS.Info)) + except ModuleNotFoundError: + pass # Ignore writing to journald # Finally, print the log unless we skipped it based on level. # We use sys.stdout.write()+flush() instead of print() to try and |