summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2010-03-28 06:45:18 +0000
committerJazzyNico <nicoduf@yahoo.fr>2010-03-28 06:45:18 +0000
commitde0d8c41b2329cc9571415c1bb93ca711c1c6bf0 (patch)
tree6323f651349caa1a8b8c002830733c6d8dc72fe9
parentExtensions. Use uniconvertor first, instead of uniconv. (diff)
downloadinkscape-de0d8c41b2329cc9571415c1bb93ca711c1c6bf0.tar.gz
inkscape-de0d8c41b2329cc9571415c1bb93ca711c1c6bf0.zip
Extensions. Small bug in uniconvertor output.
(bzr r9247)
-rw-r--r--share/extensions/uniconv_output.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/share/extensions/uniconv_output.py b/share/extensions/uniconv_output.py
index ffd78736b..9cdac7fc2 100644
--- a/share/extensions/uniconv_output.py
+++ b/share/extensions/uniconv_output.py
@@ -92,21 +92,21 @@ def run(command_format, prog_name, uniconv_format):
def get_command():
cmd = None
-try:
- from subprocess import Popen, PIPE
- p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait()
- if p==0 :
- cmd = 'uniconvertor'
- else:
- p = Popen('uniconv', shell=True, stdout=PIPE, stderr=PIPE).wait()
+ try:
+ from subprocess import Popen, PIPE
+ p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait()
if p==0 :
- cmd = 'uniconv'
-except ImportError:
- from popen2 import Popen3
- p = Popen3('uniconv', True).wait()
- if p!=32512 : cmd = 'uniconv'
- p = Popen3('uniconvertor', True).wait()
- if p!=32512 : cmd = 'uniconvertor'
+ cmd = 'uniconvertor'
+ else:
+ p = Popen('uniconv', shell=True, stdout=PIPE, stderr=PIPE).wait()
+ if p==0 :
+ cmd = 'uniconv'
+ except ImportError:
+ from popen2 import Popen3
+ p = Popen3('uniconv', True).wait()
+ if p!=32512 : cmd = 'uniconv'
+ p = Popen3('uniconvertor', True).wait()
+ if p!=32512 : cmd = 'uniconvertor'
if cmd == None:
# there's no succeffully-returning uniconv command; try to get the module directly (on Windows)
@@ -122,6 +122,7 @@ except ImportError:
'and install into your Inkscape\'s Python location\n'))
sys.exit(1)
cmd = 'python -c "from uniconvertor import uniconv; uniconv();"'
+
return cmd
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 encoding=utf-8 textwidth=99