src/reportlab/pdfbase/pdfpattern.py
branchpy33
changeset 3721 0c93dd8ff567
parent 3317 7cc62d990f32
child 3794 398ea04239b5
--- a/src/reportlab/pdfbase/pdfpattern.py	Fri Feb 15 15:54:16 2013 +0000
+++ b/src/reportlab/pdfbase/pdfpattern.py	Tue Apr 30 14:20:22 2013 +0100
@@ -27,9 +27,9 @@
         for x in pattern_sequence:
             if type(x) not in toptypes:
                 if len(x)!=1:
-                    raise ValueError, "sequence elts must be strings or singletons containing strings: "+repr(x)
+                    raise ValueError("sequence elts must be strings or singletons containing strings: "+repr(x))
                 if type(x[0]) is not StringType:
-                    raise ValueError, "Singletons must contain strings or instances only: "+repr(x[0])
+                    raise ValueError("Singletons must contain strings or instances only: "+repr(x[0]))
     def __setitem__(self, item, value):
         self.arguments[item] = value
     def __getitem__(self, item):
@@ -48,7 +48,7 @@
                 name = x[0]
                 value = arguments.get(name, None)
                 if value is None:
-                    raise ValueError, "%s value not defined" % repr(name)
+                    raise ValueError("%s value not defined" % repr(name))
                 if type(value) is InstanceType:
                     #L.append( value.format(document) )
                     L.append(format(value, document))