Finish pulling all the cruft out of pyfa.py relating to logging and error handling. All that is now done in separate areas.
Also finally did some major reworking on the error dialog. Now it doesn't spawn a new wxApp and wxFrame for each and every error - attaches to MainFrame and sticks around, having exceptions append to it rather than spawn a new one. In the case that an error happens before MainFrame is available, it spins up a new wxApp. Yay cleanup!
This commit is contained in:
@@ -20,7 +20,6 @@ class PreCheckMessage():
|
||||
pass
|
||||
finally:
|
||||
print(msg)
|
||||
sys.exit()
|
||||
|
||||
def version_precheck():
|
||||
global version_block
|
||||
@@ -43,7 +42,7 @@ def version_precheck():
|
||||
raise Exception()
|
||||
|
||||
import wx
|
||||
version_block += "\nwxPython version: {} (wxWidgets {})".format(VERSION_STRING, wx.wxWidgets_version)
|
||||
version_block += "\nwxPython version: {} ({})".format(VERSION_STRING, wx.wxWidgets_version)
|
||||
except:
|
||||
msg = "pyfa requires wxPython v4.0.0b2+. You can download wxPython from https://wxpython.org/pages/downloads/"
|
||||
raise PreCheckException(msg)
|
||||
|
||||
Reference in New Issue
Block a user