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
This commit is contained in:
Marek Marczykowski-Górecki 2021-02-26 01:41:46 +01:00
parent 3b1e57dc73
commit 740a56781e
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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}'