소스 검색

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