Code

fix obsolete syntax that emits warnings
authorbuliabyak <buliabyak@users.sourceforge.net>
Mon, 2 Feb 2009 15:59:57 +0000 (15:59 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Mon, 2 Feb 2009 15:59:57 +0000 (15:59 +0000)
share/extensions/dimension.py
share/extensions/markers_strokepaint.py

index 0ff5cb7beb888b92d13592e817470a56c6c645a4..cda3a96fda1e568db784a03f413efd0c7475a4a8 100644 (file)
@@ -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)
index 7408b08d657b8c48f118a32ceaf7a1fcce353de4..265b4d4338f1beeb7e5c625ef9e8b5b732a41bb2 100644 (file)
@@ -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():