From 7642df8f31e2fa2d062842053bbc751e8d452495 Mon Sep 17 00:00:00 2001 From: JazzyNico Date: Sun, 28 Mar 2010 08:35:33 +0200 Subject: [PATCH] Extensions. Use uniconvertor first, instead of uniconv. --- share/extensions/uniconv-ext.py | 8 ++++---- share/extensions/uniconv_output.py | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/share/extensions/uniconv-ext.py b/share/extensions/uniconv-ext.py index 6869196a5..3b248d8b8 100644 --- a/share/extensions/uniconv-ext.py +++ b/share/extensions/uniconv-ext.py @@ -28,13 +28,13 @@ cmd = None try: from subprocess import Popen, PIPE - p = Popen('uniconv', shell=True, stdout=PIPE, stderr=PIPE).wait() + p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait() if p==0 : - cmd = 'uniconv' + cmd = 'uniconvertor' else: - p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait() + p = Popen('uniconv', shell=True, stdout=PIPE, stderr=PIPE).wait() if p==0 : - cmd = 'uniconvertor' + cmd = 'uniconv' except ImportError: from popen2 import Popen3 p = Popen3('uniconv', True).wait() diff --git a/share/extensions/uniconv_output.py b/share/extensions/uniconv_output.py index ee32edae3..ffd78736b 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 +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() if p==0 : cmd = 'uniconv' - else: - p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait() - if p==0 : - cmd = 'uniconvertor' - 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' +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) -- 2.30.2