Skip to content

Commit 6bcb57a

Browse files
author
Clark Perkins
committed
Fixed a couple issues with instantiating a config object
1 parent 3619890 commit 6bcb57a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stackdio/client/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ class StackdioConfig(object):
4646
str(False): False,
4747
}
4848

49-
def __init__(self, config_file=CFG_FILE, section='stackdio'):
49+
def __init__(self, config_file=None, section='stackdio'):
5050
super(StackdioConfig, self).__init__()
5151

5252
self.section = section
5353

54-
self._cfg_file = config_file
54+
self._cfg_file = config_file or CFG_FILE
5555

5656
self._config = ConfigParser()
5757

5858
self.usable_file = os.path.isfile(self._cfg_file)
5959

6060
if self.usable_file:
61-
self._config.read(config_file)
61+
self._config.read(self._cfg_file)
6262

6363
self.usable_section = self._config.has_section(self.section)
6464
self.usable_config = self.usable_file and self.usable_section

0 commit comments

Comments
 (0)