refactor morituri.common.directory to shed Directory() and bulk

This commit is contained in:
Samantha Baldwin
2016-11-02 17:52:14 -04:00
parent 1e0176553b
commit bccba71b42
6 changed files with 32 additions and 70 deletions

View File

@@ -33,18 +33,12 @@ from morituri.common import directory, log
class Config(log.Loggable):
def __init__(self, path=None):
if not path:
path = self.getDefaultPath()
self._path = path
self._path = path or directory.config_path()
self._parser = ConfigParser.SafeConfigParser()
self.open()
def getDefaultPath(self):
return directory.Directory().getConfig()
def open(self):
# Open the file with the correct encoding
if os.path.exists(self._path):