Move logging initialization back to pyfa.py
This commit is contained in:
@@ -29,11 +29,6 @@ staticPath = None
|
|||||||
saveDB = None
|
saveDB = None
|
||||||
gameDB = None
|
gameDB = None
|
||||||
|
|
||||||
# TODO: move back to pyfa.py main loop
|
|
||||||
# We moved it here just to avoid rebuilding windows skeleton for now (any change to pyfa.py needs it)
|
|
||||||
import logging
|
|
||||||
logging.basicConfig()
|
|
||||||
|
|
||||||
def defPaths():
|
def defPaths():
|
||||||
global pyfaPath
|
global pyfaPath
|
||||||
global savePath
|
global savePath
|
||||||
|
|||||||
8
pyfa.py
8
pyfa.py
@@ -33,7 +33,7 @@ if not hasattr(sys, 'frozen'):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
print("Cannot find wxPython\nYou can download wxPython (2.8+) from http://www.wxpython.org/")
|
print("Cannot find wxPython\nYou can download wxPython (2.8+) from http://www.wxpython.org/")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# if user wants to force 2.8, try that and go directly to ensureMinimal path if fails
|
# if user wants to force 2.8, try that and go directly to ensureMinimal path if fails
|
||||||
try:
|
try:
|
||||||
if getattr(config.configforced, "force28", False):
|
if getattr(config.configforced, "force28", False):
|
||||||
@@ -51,7 +51,7 @@ if not hasattr(sys, 'frozen'):
|
|||||||
print "Installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8+) from http://www.wxpython.org/"
|
print "Installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8+) from http://www.wxpython.org/"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
print "wxPython 2.8 not found; attempting to use newer version, expect errors"
|
print "wxPython 2.8 not found; attempting to use newer version, expect errors"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
@@ -87,6 +87,10 @@ if __name__ == "__main__":
|
|||||||
config.saveInRoot = True
|
config.saveInRoot = True
|
||||||
config.defPaths()
|
config.defPaths()
|
||||||
|
|
||||||
|
# Basic logging
|
||||||
|
import logging
|
||||||
|
logging.basicConfig()
|
||||||
|
|
||||||
# Import everything
|
# Import everything
|
||||||
import wx
|
import wx
|
||||||
import os
|
import os
|
||||||
|
|||||||
Reference in New Issue
Block a user