From: aurium Date: Fri, 9 Jan 2009 00:27:15 +0000 (+0000) Subject: little change to meke extensions more testables X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d4ef4e6e868d55a999e564cef9e3f2af102be9a9;p=inkscape.git little change to meke extensions more testables --- diff --git a/share/extensions/inkex.py b/share/extensions/inkex.py index d395769d3..49f875ac2 100755 --- a/share/extensions/inkex.py +++ b/share/extensions/inkex.py @@ -165,15 +165,15 @@ class Effect: def output(self): """Serialize document into XML on stdout""" self.document.write(sys.stdout) - def affect(self): + def affect(self, args=sys.argv[1:], output=True): """Affect an SVG document with a callback effect""" - self.getoptions() + self.getoptions(args) self.parse() self.getposinlayer() self.getselected() self.getdocids() self.effect() - self.output() + if output: self.output() def uniqueId(self, old_id, make_new_id = True): new_id = old_id