From d4ef4e6e868d55a999e564cef9e3f2af102be9a9 Mon Sep 17 00:00:00 2001 From: aurium Date: Fri, 9 Jan 2009 00:27:15 +0000 Subject: [PATCH] little change to meke extensions more testables --- share/extensions/inkex.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.30.2