Browse Source

Cleanly fail on Python 2

Keir Fraser 4 years ago
parent
commit
500d485c5d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      gw

+ 4 - 0
gw

@@ -2,6 +2,10 @@
 
 import sys, os
 
+if sys.version_info < (3,0,0):
+    print('** FATAL ERROR: Greaseweazle requires Python 3')
+    sys.exit(1)
+
 # Update the search path and import the real script
 sys.path[0] = os.path.join(sys.path[0], "scripts")
 import gw