We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3619890 commit 6bcb57aCopy full SHA for 6bcb57a
stackdio/client/config.py
@@ -46,19 +46,19 @@ class StackdioConfig(object):
46
str(False): False,
47
}
48
49
- def __init__(self, config_file=CFG_FILE, section='stackdio'):
+ def __init__(self, config_file=None, section='stackdio'):
50
super(StackdioConfig, self).__init__()
51
52
self.section = section
53
54
- self._cfg_file = config_file
+ self._cfg_file = config_file or CFG_FILE
55
56
self._config = ConfigParser()
57
58
self.usable_file = os.path.isfile(self._cfg_file)
59
60
if self.usable_file:
61
- self._config.read(config_file)
+ self._config.read(self._cfg_file)
62
63
self.usable_section = self._config.has_section(self.section)
64
self.usable_config = self.usable_file and self.usable_section
0 commit comments