From 91bb960e169cfad6e6ceb44f73e807e143d3b1e9 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Thu, 13 Jan 2011 22:47:21 +0000 Subject: Allow rpkidemo to run under python 2.6+ instead of just 2.6 (needed for python 2.7 on some systems now) svn path=/scripts/rpkidemo; revision=3607 --- scripts/rpkidemo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/rpkidemo b/scripts/rpkidemo index f02b1cc3..217d0b38 100755 --- a/scripts/rpkidemo +++ b/scripts/rpkidemo @@ -47,7 +47,7 @@ import sys python_version = sys.version_info[:2] -have_ssl_module = python_version == (2, 6) +have_ssl_module = python_version >= (2, 6) if python_version == (2, 5): print """ @@ -69,15 +69,15 @@ if python_version == (2, 5): else: print 'Please answer "yes" or "no"' -elif python_version == (2, 6): +elif have_ssl_module: try: import ssl except ImportError: - sys.exit("You're running Python 2.6, but I can't find the ssl module, so you have no SSL support at all, argh!") + sys.exit("You're running Python 2.6+, but I can't find the ssl module, so you have no SSL support at all, argh!") else: - sys.exit("Sorry, this script requires Python 2.6, I seem to be running in %s" % sys.version) + sys.exit("Sorry, this script requires Python 2.6+, I seem to be running in %s" % sys.version) # Ok, it's safe to import the other stuff we need now -- cgit v1.2.3