diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2009-11-29 12:42:45 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2009-11-29 12:42:45 +0000 |
| commit | bbefc771b039bfb9e6ad819a8e5f62256ed25a19 (patch) | |
| tree | 2150ab2124af3a59df1720b92a35deb5f05ddca9 | |
| parent | Dutch and German translations update. (diff) | |
| download | inkscape-bbefc771b039bfb9e6ad819a8e5f62256ed25a19.tar.gz inkscape-bbefc771b039bfb9e6ad819a8e5f62256ed25a19.zip | |
Deprecation warning fix on xcf export
Fixed bugs:
- https://launchpad.net/bugs/485027
(bzr r8846)
| -rwxr-xr-x | share/extensions/gimp_xcf.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/share/extensions/gimp_xcf.py b/share/extensions/gimp_xcf.py index 22e45006b..92da6cf40 100755 --- a/share/extensions/gimp_xcf.py +++ b/share/extensions/gimp_xcf.py @@ -19,6 +19,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import inkex import sys, os, tempfile +try: + from subprocess import Popen, PIPE + bsubprocess = True +except: + bsubprocess = False + class MyEffect(inkex.Effect): def __init__(self): inkex.Effect.__init__(self) @@ -95,7 +101,13 @@ class MyEffect(inkex.Effect): name = "%s.png" % id filename = os.path.join(tmp_dir, name) command = "inkscape -i %s -j %s -e %s %s " % (id, area, filename, svg_file) - _,f,err = os.popen3(command,'r') + if bsubprocess: + p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE) + return_code = p.wait() + f = p.stdout + err = p.stderr + else: + _,f,err = os.popen3(command,'r') f.read() f.close() err.close() |
