Skip to content

Commit d7e880c

Browse files
committed
Merge pull request #34 from reactormonk/master
print() so python3 actually prints the error
2 parents 98e9ab4 + e17c061 commit d7e880c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

pyfa.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@
2424
if not hasattr(sys, 'frozen'):
2525

2626
if sys.version_info < (2,6) or sys.version_info > (3,0):
27-
print "Pyfa requires python 2.x branch ( >= 2.6 )\nExiting."
27+
print("Pyfa requires python 2.x branch ( >= 2.6 )\nExiting.")
2828
sys.exit(1)
2929

3030
try:
3131
import wxversion
3232
except ImportError:
33-
print "Cannot find wxPython\nYou can download wxPython (2.8) from http://www.wxpython.org/"
33+
print("Cannot find wxPython\nYou can download wxPython (2.8) from http://www.wxpython.org/")
3434
sys.exit(1)
3535
try:
3636
wxversion.select('2.8')
3737
except wxversion.VersionError:
3838
try:
3939
wxversion.ensureMinimal('2.8')
4040
except wxversion.VersionError:
41-
print "Installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8) from http://www.wxpython.org/"
41+
print("Installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8) from http://www.wxpython.org/")
4242
sys.exit(1)
4343
else:
44-
print "wxPython 2.8 not found; attempting to use newer version, expect errors"
44+
print("wxPython 2.8 not found; attempting to use newer version, expect errors")
4545

4646
try:
4747
import sqlalchemy
@@ -54,13 +54,13 @@
5454
betaFlag = True if saMatch.group(3) == "b" else False
5555
saBuild = int(saMatch.group(4)) if not betaFlag else 0
5656
if saMajor == 0 and (saMinor < 5 or (saMinor == 5 and saBuild < 8)):
57-
print "Pyfa requires sqlalchemy 0.5.8 at least but current sqlalchemy version is %s\nYou can download sqlalchemy (0.5.8+) from http://www.sqlalchemy.org/".format(sqlalchemy.__version__)
57+
print("Pyfa requires sqlalchemy 0.5.8 at least but current sqlalchemy version is %s\nYou can download sqlalchemy (0.5.8+) from http://www.sqlalchemy.org/".format(sqlalchemy.__version__))
5858
sys.exit(1)
5959
else:
60-
print "Unknown sqlalchemy version string format, skipping check"
60+
print("Unknown sqlalchemy version string format, skipping check")
6161

6262
except ImportError:
63-
print "Cannot find sqlalchemy.\nYou can download sqlalchemy (0.6+) from http://www.sqlalchemy.org/"
63+
print("Cannot find sqlalchemy.\nYou can download sqlalchemy (0.6+) from http://www.sqlalchemy.org/")
6464
sys.exit(1)
6565

6666
from optparse import OptionParser

0 commit comments

Comments
 (0)