From 9c693cd7edf8ae020d137d2edf78d171deba7ef0 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Sat, 18 Mar 2017 13:11:40 -0700 Subject: [PATCH] Python now properly requires 2.7 and not 2.6 or 2.7. Removed duplicate output to log, now that we handle exceptions. --- gui/errorDialog.py | 2 ++ pyfa.py | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/errorDialog.py b/gui/errorDialog.py index 98e0fc1bc..160043b4f 100644 --- a/gui/errorDialog.py +++ b/gui/errorDialog.py @@ -90,6 +90,8 @@ class ErrorFrame(wx.Frame): 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) diff --git a/pyfa.py b/pyfa.py index 44eb6b61a..154bbf5fe 100755 --- a/pyfa.py +++ b/pyfa.py @@ -242,9 +242,9 @@ if __name__ == "__main__": 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'): @@ -257,7 +257,6 @@ if __name__ == "__main__": 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'): @@ -270,7 +269,6 @@ if __name__ == "__main__": 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__