From d8c4e12a415c9a8917bda0ba3c1ae7931301fc6e Mon Sep 17 00:00:00 2001 From: Nati Cohen Date: Tue, 2 Apr 2024 23:56:11 +0300 Subject: [PATCH] add a Python version check when running as a script (#49) --- src/porting-advisor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/porting-advisor.py b/src/porting-advisor.py index df7f719..fc14ba2 100644 --- a/src/porting-advisor.py +++ b/src/porting-advisor.py @@ -16,8 +16,12 @@ SPDX-License-Identifier: Apache-2.0 """ +import sys from advisor import main if __name__ == '__main__': + if sys.version_info < (3, 10): + print("Python 3.10 or newer is required to run this application.") + sys.exit(1) main()