From 740a56781e97b72f41a19c74bd07c0a3e8e4f068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 26 Feb 2021 01:41:46 +0100 Subject: [PATCH] qmemman: Load default log-level value if not present in the config Don't crash if the config wasn't updated. Fixes QubesOS/qubes-issues#6427 --- qubes/tools/qmemmand.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/tools/qmemmand.py b/qubes/tools/qmemmand.py index 6fb8d549..55666558 100644 --- a/qubes/tools/qmemmand.py +++ b/qubes/tools/qmemmand.py @@ -269,7 +269,7 @@ def main(): qubes.utils.parse_size(config.get('global', 'dom0-mem-boost')) qubes.qmemman.algo.CACHE_FACTOR = \ config.getfloat('global', 'cache-margin-factor') - loglevel = config.getint('global', 'log-level') + loglevel = config.getint('global', 'log-level', fallback=30) logging.root.setLevel(loglevel) log.info('MIN_PREFMEM={algo.MIN_PREFMEM}'