summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-09-07 11:33:36 +0000
committerGerrit Code Review <review@openstack.org>2015-09-07 11:33:36 +0000
commit7a47fedbbe88cb3726f32b872f621e6a5407bdb5 (patch)
treee69dbde41a5744f42ff1e5dabbd31cd6ace2fa47
parent24bff5dca48365a767d8b6f0c38be75b2d67d6fd (diff)
parentfb24f1d113c03cf4d542331428e63f58a80eef71 (diff)
downloados-client-config-7a47fedbbe88cb3726f32b872f621e6a5407bdb5.tar.gz
Merge "Handle empty defaults.yaml file"
-rw-r--r--os_client_config/defaults.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/os_client_config/defaults.py b/os_client_config/defaults.py
index a274767..897cff5 100644
--- a/os_client_config/defaults.py
+++ b/os_client_config/defaults.py
@@ -35,6 +35,8 @@ def get_defaults():
key=None,
)
with open(_yaml_path, 'r') as yaml_file:
- _defaults.update(yaml.load(yaml_file.read()))
+ updates = yaml.load(yaml_file.read())
+ if updates is not None:
+ _defaults.update(updates)
return _defaults.copy()