Browse Source

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
Marek Marczykowski-Górecki 3 years ago
parent
commit
740a56781e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      qubes/tools/qmemmand.py

+ 1 - 1
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}'