Commit d664018b authored by ibuler's avatar ibuler

[Update] 修改config.py

parent 0f32e788
...@@ -200,7 +200,10 @@ class Config(dict): ...@@ -200,7 +200,10 @@ class Config(dict):
return False return False
e.strerror = 'Unable to load configuration file (%s)' % e.strerror e.strerror = 'Unable to load configuration file (%s)' % e.strerror
raise raise
return self.from_mapping(obj) if obj:
return self.from_mapping(obj)
else:
return False
def from_mapping(self, *mapping, **kwargs): def from_mapping(self, *mapping, **kwargs):
"""Updates the config like :meth:`update` ignoring items with non-upper """Updates the config like :meth:`update` ignoring items with non-upper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment