Skip to content

Commit

Permalink
Rework Python-pre-check message
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Jun 8, 2022
1 parent 80a94a9 commit e706980
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions check_python_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ def check():
print('Running Python', sys.version)

if sys.version_info < MINIMUM_VERSION:
print('[!] Python version unsupported. Minimum version required: Python {}'.format(
print('[!] Python version UNSUPPORTED by DSMR-reader. Minimum version required: Python {}'.format(
'.'.join([str(x) for x in MINIMUM_VERSION])
))
sys.exit(1)

# Deprecation.
if sys.version_info < PREFERRED_MINIMUM_VERSION:
print(
'[WARNING] Python version is deprecated. Preferred version for DSMR-reader is Python {} or higher.'.format(
'[WARNING] Your Python version can still be used with your current DSMR-reader version. '
'However, Python {} or higher is preferred. Consider using it for new installations in the future.'.format(
'.'.join([str(x) for x in PREFERRED_MINIMUM_VERSION])
)
)
Expand Down

0 comments on commit e706980

Please sign in to comment.