Commit b271b5f6 authored by Ben Bennett's avatar Ben Bennett

Changed the args to subprocess.Popen to pass args to the command

Before the command was not working correctly to check the calibre version since it seemed to be treating the entire string as the command.  So when ' --version' was added it was breaking.  I changed the format to pass the command and args as a list and it seems to work correctly.
parent 2449b404
...@@ -34,7 +34,7 @@ def versionCalibre(): ...@@ -34,7 +34,7 @@ def versionCalibre():
versions = _(u'not installed') versions = _(u'not installed')
if os.path.exists(ub.config.config_converterpath): if os.path.exists(ub.config.config_converterpath):
try: try:
p = subprocess.Popen(ub.config.config_converterpath + ' --version', stdout=subprocess.PIPE, stderr=subprocess.PIPE) p = subprocess.Popen([ub.config.config_converterpath, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p.wait() p.wait()
for lines in p.stdout.readlines(): for lines in p.stdout.readlines():
if isinstance(lines, bytes): if isinstance(lines, bytes):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment