From b9e2b11a5495aa67b3e2f8ccf6d4025889ec5e23 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Wed, 11 Sep 2013 00:06:06 +0400 Subject: [PATCH] Modify wxpython version check, to make 2.8 as soft requirement - 2.9 is acceptable too --- pyfa.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pyfa.py b/pyfa.py index 61b621d29..6856ba21c 100755 --- a/pyfa.py +++ b/pyfa.py @@ -29,10 +29,19 @@ if not hasattr(sys, 'frozen'): try: import wxversion - wxversion.select('2.8') - except (ImportError, wxversion.VersionError): - print "Cannot find wxPython or the installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8) from http://www.wxpython.org/" + except ImportError: + print "Cannot find wxPython\nYou can download wxPython (2.8) from http://www.wxpython.org/" sys.exit(1) + try: + wxversion.select('2.8') + except wxversion.VersionError: + try: + wxversion.ensureMinimal('2.8') + except wxversion.VersionError: + print "Installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8) from http://www.wxpython.org/" + sys.exit(1) + else: + print "wxPython 2.8 not found; attempting to use newer version, expect errors" try: import sqlalchemy