From: buliabyak Date: Mon, 2 Feb 2009 15:59:57 +0000 (+0000) Subject: fix obsolete syntax that emits warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a825bb04cf2b441c2cb2bd4770c4ed2c6d6b5e02;p=inkscape.git fix obsolete syntax that emits warnings --- diff --git a/share/extensions/dimension.py b/share/extensions/dimension.py index 0ff5cb7be..cda3a96fd 100644 --- a/share/extensions/dimension.py +++ b/share/extensions/dimension.py @@ -51,7 +51,7 @@ class Dimension(pathmodifier.PathModifier): def addMarker(self, name, rotate): defs = self.xpathSingle('/svg:svg//svg:defs') - if not defs: + if defs == None: defs = inkex.etree.SubElement(self.document.getroot(),inkex.addNS('defs','svg')) marker = inkex.etree.SubElement(defs ,inkex.addNS('marker','svg')) marker.set('id', name) diff --git a/share/extensions/markers_strokepaint.py b/share/extensions/markers_strokepaint.py index 7408b08d6..265b4d433 100644 --- a/share/extensions/markers_strokepaint.py +++ b/share/extensions/markers_strokepaint.py @@ -30,7 +30,7 @@ class MyEffect(inkex.Effect): def effect(self): defs = self.xpathSingle('/svg:svg//svg:defs') - if not defs: + if defs == None: defs = inkex.etree.SubElement(self.document.getroot(),inkex.addNS('defs','svg')) for id, node in self.selected.iteritems():