1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- render-pngs.py (original)
+++ render-pngs.py (refactored)
@@ -82,7 +82,7 @@
def isFloat(self, stringVal):
try:
return (float(stringVal), True)[1]
- except (ValueError, TypeError), e:
+ except (ValueError, TypeError) as e:
return False
def parseCoordinates(self, val):
@@ -236,7 +236,7 @@
xmlParser.setContentHandler(svgLayerHandler)
try:
xmlParser.parse(svgFilename)
- except SAXParseException, e:
+ except SAXParseException as e:
fatalError("Error parsing SVG file '%s': line %d,col %d: %s. If you're seeing this within inkscape, it probably indicates a bug that should be reported." % (svgfile, e.getLineNumber(), e.getColumnNumber(), e.getMessage()))
# verify that the svg file actually contained some rectangles.
|