summaryrefslogtreecommitdiff
path: root/openstackclient/common/logs.py
diff options
context:
space:
mode:
authorting.wang <ting.wang@easystack.cn>2016-02-20 14:28:08 +0800
committerting.wang <ting.wang@easystack.cn>2016-02-21 13:21:31 +0800
commite2158b7ef4c307ff5be7bd2ef0ca3044f37759d4 (patch)
treef42047689a1b39d5c3bdf078261d7a277fcdbed2 /openstackclient/common/logs.py
parent867bcb0db8742fd2daa5c91dfd3c164ac4178f18 (diff)
downloadpython-openstackclient-e2158b7ef4c307ff5be7bd2ef0ca3044f37759d4.tar.gz
Clean redundant argument to dict.get
`dict.get()` returns `None` by default, if a key wasn't found. Removing `None` as second argument to avoid redundancy. Change-Id: Ia82f7469cd019509bbeccbfe54b15eeedc7bb6ea
Diffstat (limited to 'openstackclient/common/logs.py')
-rw-r--r--openstackclient/common/logs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/common/logs.py b/openstackclient/common/logs.py
index 7ad6e832..221c5997 100644
--- a/openstackclient/common/logs.py
+++ b/openstackclient/common/logs.py
@@ -169,7 +169,7 @@ class LogConfigurator(object):
self.dump_trace = cloud_config.config.get('debug', self.dump_trace)
self.console_logger.setLevel(log_level)
- log_file = cloud_config.config.get('log_file', None)
+ log_file = cloud_config.config.get('log_file')
if log_file:
if not self.file_logger:
self.file_logger = logging.FileHandler(filename=log_file)
@@ -179,7 +179,7 @@ class LogConfigurator(object):
self.file_logger.setLevel(log_level)
self.root_logger.addHandler(self.file_logger)
- logconfig = cloud_config.config.get('logging', None)
+ logconfig = cloud_config.config.get('logging')
if logconfig:
highest_level = logging.NOTSET
for k in logconfig.keys():