Fixed conf with None path

This commit is contained in:
Veronica K. B. Olsen
2020-06-08 18:58:41 +02:00
parent aa81009760
commit 0a6e89e2f6
+6
View File
@@ -309,6 +309,9 @@ class Config:
"""Load preferences from file and replace default settings.
"""
logger.debug("Loading config file")
if self.confPath is None:
return False
cnfParse = configparser.ConfigParser()
cnfPath = path.join(self.confPath, self.confFile)
try:
@@ -484,6 +487,9 @@ class Config:
"""Save the current preferences to file.
"""
logger.debug("Saving config file")
if self.confPath is None:
return False
cnfParse = configparser.ConfigParser()
# Set options