diff --git a/Lib/idlelib/idle_test/run_coverage.py b/Lib/idlelib/idle_test/run_coverage.py index a3ef44b3f29..01314a88827 100755 --- a/Lib/idlelib/idle_test/run_coverage.py +++ b/Lib/idlelib/idle_test/run_coverage.py @@ -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()