From: pjrm Date: Fri, 27 Feb 2009 02:15:41 +0000 (+0000) Subject: share/extensions/inkex.py: Fix a couple of issues reported by pychecker. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9aa41f8a0a4ae09aa39abd6dc3b6d2e00f8a8c2d;p=inkscape.git share/extensions/inkex.py: Fix a couple of issues reported by pychecker. --- diff --git a/share/extensions/inkex.py b/share/extensions/inkex.py index 98ebf9d1f..adc0d0fed 100755 --- a/share/extensions/inkex.py +++ b/share/extensions/inkex.py @@ -90,7 +90,7 @@ def check_inkbool(option, opt, value): elif str(value).capitalize() == 'False': return False else: - raise OptionValueError("option %s: invalid inkbool value: %s" % (opt, value)) + raise optparse.OptionValueError("option %s: invalid inkbool value: %s" % (opt, value)) def addNS(tag, ns=None): val = tag @@ -161,10 +161,10 @@ class Effect: def getselected(self): """Collect selected nodes""" - for id in self.options.ids: - path = '//*[@id="%s"]' % id + for i in self.options.ids: + path = '//*[@id="%s"]' % i for node in self.document.xpath(path, namespaces=NSS): - self.selected[id] = node + self.selected[i] = node def getdocids(self): docIdNodes = self.document.xpath('//@id', namespaces=NSS)