[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/devtools/waf/wafadmin
From: Thomas Nagy <tnagyemail-mail () yahoo ! fr>
Date: 2006-09-30 18:54:20
Message-ID: 1159642460.893003.20610.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 590757 by tnagy:
Python 2.5 warnings about exceptions
M +6 -6 preproc.py
--- trunk/playground/devtools/waf/wafadmin/preproc.py #590756:590757
@@ -205,9 +205,9 @@
return [[num, '0']] + subst(lst[2:], defs)
if a2_type == op and a2 == '(':
if len(lst) < 4:
- raise "expected 4 tokens defined(ident)"
+ raise ValueError, "expected 4 tokens defined(ident)"
if lst[2][0] != ident:
- raise "expected defined(ident)"
+ raise ValueError, "expected defined(ident)"
if lst[2][1] in defs:
return [[num, '1']] + subst(lst[4:], defs)
else:
@@ -262,8 +262,8 @@
return [num, 1]
else:
return [num, 0]
- raise "cannot compute %s (1)" % str(lst)
- raise "cannot compute %s (2)" % str(lst)
+ raise ValueError, "cannot compute %s (1)" % str(lst)
+ raise ValueError, "cannot compute %s (2)" % str(lst)
if a1_type == stri:
if a2_type == stri:
if lst[2:]:
@@ -276,7 +276,7 @@
a3_type = lst[2][0]
a3 = lst[2][1]
except:
- raise "cannot compute %s (3)" % str(lst)
+ raise ValueError, "cannot compute %s (3)" % str(lst)
if a1_type == ident:
#print "a1"
@@ -310,7 +310,7 @@
else: val = 0
return comp( [[num, val]] + lst[3:] )
- raise "could not parse the macro %s " % str(lst)
+ raise ValueError, "could not parse the macro %s " % str(lst)
class filter:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic