Split help command executable in settings
This commit is contained in:
parent
05f4a59b66
commit
e9391aedc0
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user