aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@amacapital.net>2014-10-09 11:00:37 -0700
committerAndy Lutomirski <luto@amacapital.net>2014-10-09 11:00:37 -0700
commitb24ff78734d4114638c307bab1fd9525ad313357 (patch)
tree8f7932e33deea73f20db54fd7873dc01aa09f983
parentb3303011d2de91e862042d3630fa9de152752107 (diff)
downloadvirtme-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-xsetup.py4
-rwxr-xr-xvirtme-configkernel5
-rwxr-xr-xvirtme-run5
3 files changed, 12 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index cb58534..b69e9d4 100755
--- a/setup.py
+++ b/setup.py
@@ -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())
diff --git a/virtme-run b/virtme-run
index f9457db..d472f81 100755
--- a/virtme-run
+++ b/virtme-run
@@ -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())