diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-12-02 18:02:25 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-12-03 12:04:59 +0100 |
commit | 4d13280994d9b476256861b93efabad55880bd64 (patch) | |
tree | fdfdf144ae693242a92a8e39528930e1e94d2d07 /tests/unit/utils/test_log.py | |
parent | 1ca68e6280f44493e0976f3535ae765dd2b6c90e (diff) | |
download | qutebrowser-4d13280994d9b476256861b93efabad55880bd64.tar.gz qutebrowser-4d13280994d9b476256861b93efabad55880bd64.zip |
pylint: Fix some legitimate issues
Diffstat (limited to 'tests/unit/utils/test_log.py')
-rw-r--r-- | tests/unit/utils/test_log.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/unit/utils/test_log.py b/tests/unit/utils/test_log.py index 7682c1156..7b0f5293e 100644 --- a/tests/unit/utils/test_log.py +++ b/tests/unit/utils/test_log.py @@ -53,8 +53,7 @@ def restore_loggers(): saved_level_to_name = logging._levelToName.copy() logger_states = {} for name in saved_loggers: - logger_states[name] = getattr(saved_loggers[name], 'disabled', - None) + logger_states[name] = getattr(saved_loggers[name], 'disabled', None) finally: logging._releaseLock() @@ -86,9 +85,9 @@ def restore_loggers(): logger_dict = logging.getLogger().manager.loggerDict logger_dict.clear() logger_dict.update(saved_loggers) - for name in logger_states: - if logger_states[name] is not None: - saved_loggers[name].disabled = logger_states[name] + for name, state in logger_states.items(): + if state is not None: + saved_loggers[name].disabled = state finally: logging._releaseLock() |