From 656d986b3bc489bf6751cf057a0bfdc2a1458de9 Mon Sep 17 00:00:00 2001 From: sasilver Date: Wed, 9 Jul 2008 09:09:20 +0000 Subject: [PATCH] Remove use of obsolete sodipodi:docbase from Python scripts (see bug 246721). --- share/extensions/embedimage.py | 9 ++------- share/extensions/svg_and_media_zip_output.py | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/share/extensions/embedimage.py b/share/extensions/embedimage.py index 80030a000..ab903a18e 100644 --- a/share/extensions/embedimage.py +++ b/share/extensions/embedimage.py @@ -57,19 +57,14 @@ class Embedder(inkex.Effect): absref=node.get(inkex.addNS('absref','sodipodi')) href=xlink svg=self.document.getroot().xpath('/svg:svg', namespaces=inkex.NSS)[0] - docbase=svg.get(inkex.addNS('docbase','sodipodi')) - path='' #path selection strategy: # 1. href if absolute - # 2. sodipodi:docbase + href - # 3. realpath-ified href - # 4. absref, only if the above does not point to a file + # 2. realpath-ified href + # 3. absref, only if the above does not point to a file if (href != None): if (os.path.isabs(href)): path=os.path.realpath(href) - elif (docbase != None): - path=os.path.join(docbase,href) else: path=os.path.realpath(href) if (not os.path.isfile(path)): diff --git a/share/extensions/svg_and_media_zip_output.py b/share/extensions/svg_and_media_zip_output.py index e34f01749..cc8f7db0e 100644 --- a/share/extensions/svg_and_media_zip_output.py +++ b/share/extensions/svg_and_media_zip_output.py @@ -53,7 +53,6 @@ class MyEffect(inkex.Effect): def effect(self): ttmp_orig = self.document.getroot() - docbase = ttmp_orig.get(inkex.addNS('docbase',u'sodipodi'),'') docname = ttmp_orig.get(inkex.addNS('docname',u'sodipodi')) orig_tmpfile = sys.argv[1] -- 2.30.2