Make sure not to catch keyboard interrupts and system exits
This commit is contained in:
@@ -17,6 +17,8 @@ class PreCheckMessage:
|
||||
app = wx.App(False)
|
||||
wx.MessageBox(msg, 'Error', wx.ICON_ERROR | wx.STAY_ON_TOP)
|
||||
app.MainLoop()
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
@@ -45,6 +47,8 @@ def version_precheck():
|
||||
|
||||
import wx
|
||||
version_block += "\nwxPython version: {} ({})".format(VERSION_STRING, wx.wxWidgets_version)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except:
|
||||
msg = "pyfa requires wxPython v4.0.0b2+. You can download wxPython from https://wxpython.org/pages/downloads/"
|
||||
raise PreCheckException(msg)
|
||||
@@ -56,6 +60,8 @@ def version_precheck():
|
||||
|
||||
if (int(saMatch.group(1)), int(saMatch.group(2)), int(saMatch.group(3))) < (1, 0, 5):
|
||||
raise Exception()
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except:
|
||||
msg = "pyfa requires SQLAlchemy v1.0.5+. You can download SQLAlchemy from https://www.sqlalchemy.org/download.html"
|
||||
raise PreCheckException(msg)
|
||||
@@ -67,12 +73,16 @@ def version_precheck():
|
||||
|
||||
if int(logVersion[0]) < 1:
|
||||
raise Exception()
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except:
|
||||
raise PreCheckException("pyfa requires Logbook version 1.0.0+. You can download Logbook from https://pypi.python.org/pypi/Logbook")
|
||||
|
||||
try:
|
||||
import requests
|
||||
version_block += "\nRequests version: {}".format(requests.__version__)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except:
|
||||
msg = "pyfa requires the requests module. You can download requests from https://pypi.python.org/pypi/requests"
|
||||
raise PreCheckException(msg)
|
||||
@@ -80,6 +90,8 @@ def version_precheck():
|
||||
try:
|
||||
import dateutil
|
||||
version_block += "\nDateutil version: {}".format(dateutil.__version__)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except:
|
||||
msg = "pyfa requires the python-dateutil module. You can download python-dateutil form https://pypi.python.org/pypi/python-dateutil"
|
||||
raise PreCheckException(msg)
|
||||
|
||||
Reference in New Issue
Block a user