add check for Python version >=3

This commit is contained in:
Tal Einat 2020-10-15 00:27:41 +03:00
parent fbb51ae388
commit 8110f99362
No known key found for this signature in database
GPG Key ID: 613A98AF4C800CDA
1 changed files with 4 additions and 0 deletions

View File

@ -172,4 +172,8 @@ def display_coverage_report(*, module_name):
if __name__ == '__main__':
if sys.version_info < (3,):
print('Running this script with Python 2 is not supported',
file=sys.stderr)
sys.exit(1)
main()