From 6f25800e4d99c0f7d223a83de50d06b2b1bbf329 Mon Sep 17 00:00:00 2001 From: aurium Date: Wed, 9 Sep 2009 17:43:37 +0000 Subject: [PATCH] giving svg_file property to Effect class. Make more readable code. --- share/extensions/inkex.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/extensions/inkex.py b/share/extensions/inkex.py index 665575c6b..b7e3e0e63 100755 --- a/share/extensions/inkex.py +++ b/share/extensions/inkex.py @@ -132,7 +132,7 @@ class Effect: try: stream = open(file,'r') except: - stream = open(self.args[-1],'r') + stream = open(self.svg_file,'r') except: stream = sys.stdin self.document = etree.parse(stream) @@ -198,6 +198,7 @@ class Effect: def affect(self, args=sys.argv[1:], output=True): """Affect an SVG document with a callback effect""" + self.svg_file = args[-1] self.getoptions(args) self.parse() self.getposinlayer() -- 2.30.2