Browse Source

Cleanly fail on Python 2

Keir Fraser 5 năm trước cách đây
mục cha
commit
500d485c5d
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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