[PATCH] setup.py: fix error message when running with python-2.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When setup.py tries to check the python version, the check actually
won't give a usable error message but it'll raise a SyntaxError. Fix
this by not using generator expressions.

Signed-off-by: Miklos Vajna <vmiklos@xxxxxxxxxxxxxx>
---
 setup.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/setup.py b/setup.py
index 8d8f7a8..44cc6ea 100755
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ def __check_min_version(min_ver, ver):
 def __check_python_version():
     """Check the minimum Python version
     """
-    pyver = '.'.join(str(n) for n in sys.version_info)
+    pyver = '.'.join(map(lambda x: str(x), sys.version_info))
     if not __check_min_version(version.python_min_ver, pyver):
         print >> sys.stderr, 'Python version %s or newer required. Found %s' \
               % (version.python_min_ver, pyver)
-- 
1.5.6.2.450.g8d367.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux