From 56ac2bf5e8a2fcc6a1928b4c7ee59bc0de355311 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sun, 20 Nov 2011 15:27:11 +0100 Subject: [PATCH] fix for python 2.4 --- waflib/Tools/perl.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/waflib/Tools/perl.py b/waflib/Tools/perl.py index dfa00396..a75e14ee 100644 --- a/waflib/Tools/perl.py +++ b/waflib/Tools/perl.py @@ -60,10 +60,14 @@ class xsubpp(Task.Task): def check_perl_version(self, minver=None): """ Check if Perl is installed, and set the variable PERL. + minver is supposed to be a tuple """ res = True - cver = "" if minver is None else ".".join(map(str,minver)) + if minver: + cver = '.'.join(map(str,minver)) + else: + cver = '' self.start_msg('Checking for minimum perl version %s' % cver) @@ -87,7 +91,7 @@ def check_perl_version(self, minver=None): if ver < minver: res = False - self.end_msg(version, color="GREEN" if res else "YELLOW") + self.end_msg(version, color=res and "GREEN" or "YELLOW") return res @conf