From a2fc49b6e723ef2110e4153ad82209206789a9ad Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 27 Sep 2020 10:45:07 -0700 Subject: [PATCH] Let config.log_level None -> setLevel(NOTSET). --- etiquette/photodb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etiquette/photodb.py b/etiquette/photodb.py index 3b5ab07..35fe3cc 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -1732,7 +1732,10 @@ class PhotoDB( # CONFIG self.config_filepath = self.data_directory.with_child(constants.DEFAULT_CONFIGNAME) self.load_config() - self.log.setLevel(self.config['log_level']) + if self.config['log_level'] is None: + self.log.setLevel(logging.NOTSET) + else: + self.log.setLevel(self.config['log_level']) self.caches = { 'album': cacheclass.Cache(maxlen=self.config['cache_size']['album']),