Skip to content

Commit d7d3d7b

Browse files
committed
! show-duplicate-java-classes: add python version check #91
1 parent 792faa5 commit d7d3d7b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bin/show-duplicate-java-classes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
__author__ = 'tg123'
1616

17+
import sys
1718
from glob import glob
1819
from os import walk
1920
from zipfile import ZipFile
@@ -115,5 +116,15 @@ def main():
115116
exit(1)
116117

117118

119+
def check_python_version():
120+
python_version = sys.version_info
121+
if python_version.major > 2:
122+
return
123+
if python_version.minor < 7:
124+
exit('Using python 2 and its version lower than 2.7, not support!\n'
125+
'Please use python 3 instead!\nPython version: ' + sys.version)
126+
127+
118128
if __name__ == '__main__':
129+
check_python_version()
119130
main()

0 commit comments

Comments
 (0)