瀏覽代碼

Cleanly fail on Python 2

Keir Fraser 5 年之前
父節點
當前提交
500d485c5d
共有 1 個文件被更改,包括 4 次插入0 次删除
  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