Skip to content

Commit

Permalink
Python now properly requires 2.7 and not 2.6 or 2.7. Removed duplicat…
Browse files Browse the repository at this point in the history
…e output to log, now that we handle exceptions.
  • Loading branch information
Ebag333 committed Mar 18, 2017
1 parent fbcd839 commit 9c693cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions gui/errorDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def __init__(self, exception, tb):
errorTextCtrl.AppendText('\n')
errorTextCtrl.AppendText("fs encoding: " + str(sys.getfilesystemencoding() or "Unknown"))
errorTextCtrl.AppendText('\n\n')
errorTextCtrl.AppendText("EXCEPTION: " + str(exception or "Unknown"))
errorTextCtrl.AppendText('\n\n')
if tb:
for line in tb:
errorTextCtrl.AppendText(line)
Expand Down
8 changes: 3 additions & 5 deletions pyfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ def handleGUIException(exc_type, exc_value, exc_traceback):
except ValueError, Exception:
pyfalog.critical("Cannot redirect. Continuing without writing stderr to log.")

if sys.version_info < (2, 6) or sys.version_info > (3, 0):
exit_message = "\nPyfa requires python 2.x branch ( >= 2.6 )\nExiting."
pyfalog.critical(exit_message)
pyfalog.info("Python version: {0}", sys.version)
if sys.version_info < (2, 7) or sys.version_info > (3, 0):
exit_message = "Pyfa requires python 2.x branch ( >= 2.7 ).\nExiting."
raise Exception(exit_message)

if hasattr(sys, 'frozen'):
Expand All @@ -257,7 +257,6 @@ def handleGUIException(exc_type, exc_value, exc_traceback):
pyfalog.debug("wxPython version: {0}.", wxversion.getInstalled())
elif wx is None or wxversion is None:
exit_message = "\nCannot find wxPython\nYou can download wxPython (2.8+) from http://www.wxpython.org/"
pyfalog.critical(exit_message)
raise Exception(exit_message)
else:
if options.force28 is True and wxversion.checkInstalled('2.8'):
Expand All @@ -270,7 +269,6 @@ def handleGUIException(exc_type, exc_value, exc_traceback):

if sqlalchemy is None:
exit_message = "\nCannot find sqlalchemy.\nYou can download sqlalchemy (0.6+) from http://www.sqlalchemy.org/"
pyfalog.critical(exit_message)
raise Exception(exit_message)
else:
saVersion = sqlalchemy.__version__
Expand Down

0 comments on commit 9c693cd

Please sign in to comment.