move debug setting, remove debug print

This commit is contained in:
blitzmann
2015-08-21 18:23:46 -04:00
parent e7fcdd86ac
commit e7542fec44
3 changed files with 10 additions and 7 deletions

View File

@@ -17,11 +17,6 @@ debug = False
# Defines if our saveddata will be in pyfa root or not
saveInRoot = False
if debug:
logLevel = logging.DEBUG
else:
logLevel = logging.WARN
# Version data
version = "1.13.3"
tag = "git"
@@ -67,12 +62,19 @@ def __createDirs(path):
os.makedirs(path)
def defPaths():
global debug
global pyfaPath
global savePath
global staticPath
global saveDB
global gameDB
global saveInRoot
if debug:
logLevel = logging.DEBUG
else:
logLevel = logging.WARN
# 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", pyfaPath)

View File

@@ -13,8 +13,6 @@ def update(saveddata_engine):
dbVersion = getVersion(saveddata_engine)
appVersion = migrations.appVersion
print dbVersion, appVersion
if dbVersion == appVersion:
return

View File

@@ -30,6 +30,7 @@ usage = "usage: %prog [--root]"
parser = OptionParser(usage=usage)
parser.add_option("-r", "--root", action="store_true", dest="rootsavedata", help="if you want pyfa to store its data in root folder, use this option", default=False)
parser.add_option("-w", "--wx28", action="store_true", dest="force28", help="Force usage of wxPython 2.8", default=False)
parser.add_option("-d", "--debug", action="store_true", dest="debug", help="Set logger to debug level.", default=False)
(options, args) = parser.parse_args()
@@ -79,6 +80,8 @@ if __name__ == "__main__":
# Configure paths
if options.rootsavedata is True:
config.saveInRoot = True
config.debug = options.debug
config.defPaths()
# Basic logging initialization