Adjust way of getting forced vars again
This commit is contained in:
17
config.py
17
config.py
@@ -3,12 +3,9 @@ import sys
|
||||
|
||||
# Load variable overrides specific to distribution type
|
||||
try:
|
||||
# Import all variables
|
||||
from configforced import *
|
||||
# Compose list of already defined variables and add them to forced list
|
||||
forcedvars = dir()
|
||||
import configforced
|
||||
except ImportError:
|
||||
forcedvars = []
|
||||
configforced = None
|
||||
|
||||
# Turns on debug mode
|
||||
debug = False
|
||||
@@ -23,14 +20,12 @@ 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
|
||||
if not "pyfaPath" in forcedvars:
|
||||
pyfaPath = unicode(os.path.dirname(os.path.abspath(sys.modules['__main__'].__file__)),
|
||||
sys.getfilesystemencoding())
|
||||
pyfaPath = getattr(configforced, "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
|
||||
if not "savePath" in forcedvars:
|
||||
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")),
|
||||
sys.getfilesystemencoding())
|
||||
savePath = getattr(configforced, "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")
|
||||
|
||||
Reference in New Issue
Block a user