From 3096de9ad2ef3360954e09b13d42fc281566fcfb Mon Sep 17 00:00:00 2001 From: "newman.daniel1" Date: Tue, 14 Sep 2010 04:55:45 +0000 Subject: [PATCH] Avoid use of lxml.etree.strip_elements() which sometimes seems to not exist; most odd git-svn-id: https://eggbotcode.googlecode.com/svn/trunk@111 72233254-1b6c-9e9c-5072-401df62706fb --- inkscape_driver/eggbot_stripdata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inkscape_driver/eggbot_stripdata.py b/inkscape_driver/eggbot_stripdata.py index 2282ca4..9e5868b 100644 --- a/inkscape_driver/eggbot_stripdata.py +++ b/inkscape_driver/eggbot_stripdata.py @@ -22,7 +22,8 @@ class EggBotStripData( inkex.Effect ): def effect( self ): '''Main entry point: check to see which tab is selected, and act accordingly.''' self.svg = self.document.getroot() - inkex.etree.strip_elements( self.svg, inkex.addNS( 'eggbot', 'svg' ) ) + for node in self.svg.xpath( '//svg:eggbot', namespaces=inkex.NSS ): + self.svg.remove( node ) inkex.errormsg( gettext.gettext( "Okay, I've removed all Eggbot data from this Inkscape file. Have a nice day!" ) ) e = EggBotStripData()