Implement and error message if config fails

This commit is contained in:
blitzman
2017-02-25 16:10:00 -05:00
parent 6ab936ef09
commit 4ba4a753cb
3 changed files with 114 additions and 18 deletions

View File

@@ -64,6 +64,8 @@ def getPyfaRoot():
root = unicode(root, sys.getfilesystemencoding())
return root
def getDefaultSave():
return unicode(os.path.expanduser(os.path.join("~", ".pyfa")), sys.getfilesystemencoding())
def defPaths(customSavePath):
global debug
@@ -93,8 +95,7 @@ def defPaths(customSavePath):
savePath = getattr(configforced, "savePath", None)
if savePath is None:
if customSavePath is None: # customSavePath is not overriden
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")),
sys.getfilesystemencoding())
savePath = getDefaultSave()
else:
savePath = customSavePath