From a825bb04cf2b441c2cb2bd4770c4ed2c6d6b5e02 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Mon, 2 Feb 2009 15:59:57 +0000 Subject: [PATCH] fix obsolete syntax that emits warnings --- share/extensions/dimension.py | 2 +- share/extensions/markers_strokepaint.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(): -- 2.30.2