commit 46f1bfb98cee79f9a00b76513d2c70df1824bb33 Author: Damian Johnson atagar@torproject.org Date: Wed Jan 30 09:36:09 2013 -0800
Changing is_python_2* prereq checks to include python 3
The is_python_26 and is_python_27 were checking if we were 2.6-2.x or 2.7-2.x. On reflection it makes more sense for these to be '2.y and above' checks rather than '2.y and above in the 2.x series'. --- stem/prereq.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/stem/prereq.py b/stem/prereq.py index 46913e4..a6eab48 100644 --- a/stem/prereq.py +++ b/stem/prereq.py @@ -42,7 +42,7 @@ def check_requirements():
def is_python_26(): """ - Checks if we're in the 2.6 - 2.x range. + Checks if we're running python 2.6 or above.
:returns: bool that is True if we meet this requirement and False otherwise """ @@ -52,7 +52,7 @@ def is_python_26():
def is_python_27(): """ - Checks if we're in the 2.7 - 2.x range. + Checks if we're running python 2.7 or above.
:returns: bool that is True if we meet this requirement and False otherwise """ @@ -95,7 +95,7 @@ def _check_version(minor_req): major_version, minor_version = sys.version_info[0:2]
if major_version > 2: - return False + return True elif major_version < 2 or minor_version < minor_req: return False