Only process points if there is an even number. Update web-based scour script to process options and rename to scra.py

This commit is contained in:
JSCHILL1 2009-06-05 09:21:23 -05:00
parent b9a9020feb
commit a4dbc37ba9
4 changed files with 438 additions and 46 deletions

View file

@ -1325,7 +1325,11 @@ def parseListOfPoints(s):
points = []
while i < len(nums):
x = SVGLength(nums[i])
y = SVGLength(nums[i+1])
# if we had an odd number of points, return empty
if i == len(nums)-1: return []
else: y = SVGLength(nums[i+1])
# if the coordinates were not unitless, return empty
if x.units != Unit.NONE or y.units != Unit.NONE: return []
points.append( (str(x.value),str(y.value)) )
i += 2