Actualy do config overrides correctly

This commit is contained in:
cncfanatics
2011-01-20 22:29:34 +01:00
parent 006e7d1cb7
commit 2b0950a9e5

View File

@@ -1,13 +1,7 @@
import os
import sys
# Load variable overrides specific to distribution type
try:
import configforced
except ImportError:
configforced = None
# Turns on debug mode
# Turns off debug mode
debug = False
# Version data
@@ -20,14 +14,10 @@ expansionVersion = "1.1.0"
# The main pyfa directory which contains run.py
# Python 2.X uses ANSI by default, so we need to convert the character encoding
pyfaPath = getattr(configforced, "pyfaPath", None)
if pyfaPath is None:
pyfaPath = unicode(os.path.dirname(os.path.abspath(sys.modules['__main__'].__file__)), sys.getfilesystemencoding())
pyfaPath = unicode(os.path.dirname(os.path.abspath(sys.modules['__main__'].__file__)), sys.getfilesystemencoding())
# Where we store the saved fits etc, default is the current users home directory
savePath = getattr(configforced, "savePath", None)
if savePath is None:
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")), sys.getfilesystemencoding())
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")), sys.getfilesystemencoding())
# Static EVE Data from the staticdata repository, should be in the staticdata directory in our pyfa directory
staticPath = os.path.join(pyfaPath, "staticdata")
@@ -40,7 +30,7 @@ saveDB = os.path.join(savePath, "saveddata.db")
# maintenance script
gameDB = os.path.join(staticPath, "eve.db")
## DON'T MODIFY ANYTHING BELOW ##
## Eos setting overrides ##
import eos.config
#Caching modifiers, disable all gamedata caching, its unneeded.
@@ -48,3 +38,9 @@ eos.config.gamedataCache = None
# saveddata db location modifier, shouldn't ever need to touch this
eos.config.saveddata_connectionstring = "sqlite:///" + saveDB + "?check_same_thread=False"
eos.config.gamedata_connectionstring = "sqlite:///" + gameDB + "?check_same_thread=False"
# Load variable overrides specific to distribution type
try:
from configforced import *
except ImportError:
pass