diff options
author | Andy Lutomirski <luto@amacapital.net> | 2014-10-09 11:00:37 -0700 |
---|---|---|
committer | Andy Lutomirski <luto@amacapital.net> | 2014-10-09 11:00:37 -0700 |
commit | b24ff78734d4114638c307bab1fd9525ad313357 (patch) | |
tree | 8f7932e33deea73f20db54fd7873dc01aa09f983 | |
parent | b3303011d2de91e862042d3630fa9de152752107 (diff) | |
download | virtme-b24ff78734d4114638c307bab1fd9525ad313357.tar.gz |
Print a more helpful error if the Python version is too old
For Python 3.2 support, virtme would need to adjust how it uses
os.uname() and it would need a replacement for shutil.which().
The latter is annoying enough that I don't really want to do it.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
-rwxr-xr-x | setup.py | 4 | ||||
-rwxr-xr-x | virtme-configkernel | 5 | ||||
-rwxr-xr-x | virtme-run | 5 |
3 files changed, 12 insertions, 2 deletions
@@ -8,8 +8,8 @@ try: except ImportError: from distutils.core import setup -if sys.version_info.major < 3: - print('virtme requires Python 3 or higher') +if sys.version_info < (3,3): + print('virtme requires Python 3.3 or higher') sys.exit(1) _VERSION = '0.0.1' diff --git a/virtme-configkernel b/virtme-configkernel index 9e94b5b..cdeb06b 100755 --- a/virtme-configkernel +++ b/virtme-configkernel @@ -9,5 +9,10 @@ # This file is not installed; it's just used to run virtme from inside # a source distribution. +import sys +if sys.version_info < (3,3): + print('virtme requires Python 3.3 or higher') + sys.exit(1) + from virtme.commands import configkernel exit(configkernel.main()) @@ -9,5 +9,10 @@ # This file is not installed; it's just use to run virtme from inside # a source distribution. +import sys +if sys.version_info < (3,3): + print('virtme requires Python 3.3 or higher') + sys.exit(1) + from virtme.commands import run exit(run.main()) |