Split help command executable in settings

This commit is contained in:
Michal Krenek (Mikos) 2017-03-28 15:52:49 +02:00
parent 05f4a59b66
commit e9391aedc0
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import os, threading
import os, threading, shlex
from Qt import QtCore
@ -39,8 +39,9 @@ class BaseInfo:
@classmethod
def help_params(cls, executable):
cmdline = shlex.split(executable)
try:
text = subprocess.check_output([executable, '-h'], universal_newlines=True,
text = subprocess.check_output(cmdline + ['-h'], universal_newlines=True,
stderr=subprocess.STDOUT, env=dict(os.environ, COLUMNS='125'),
console=False)
except subprocess.CalledProcessError as e:

View File

@ -32,12 +32,13 @@ class Info(BaseInfo):
@classmethod
def help_device(cls, executable, device):
cmdline = shlex.split(executable)
try:
text = subprocess.check_output([executable, '--detect'], universal_newlines=True,
text = subprocess.check_output(cmdline + ['--detect'], universal_newlines=True,
stderr=subprocess.DEVNULL, env=dict(os.environ, COLUMNS='125'),
console=False)
text += '\n'
text += subprocess.check_output([executable, '--device', device, '--info'], universal_newlines=True,
text += subprocess.check_output(cmdline + ['--device', device, '--info'], universal_newlines=True,
stderr=subprocess.DEVNULL, env=dict(os.environ, COLUMNS='125'),
console=False)
except subprocess.CalledProcessError as e: