mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
84b853dca8
commit
099f99a386
@ -106,13 +106,13 @@ def decode_output(raw):
|
|||||||
|
|
||||||
def run(cmd):
|
def run(cmd):
|
||||||
from calibre.gui2 import sanitize_env_vars
|
from calibre.gui2 import sanitize_env_vars
|
||||||
with sanitize_env_vars():
|
|
||||||
ecmd = list(map(encode_arg, cmd))
|
ecmd = list(map(encode_arg, cmd))
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
try:
|
try:
|
||||||
print(ecmd)
|
print(ecmd)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
with sanitize_env_vars():
|
||||||
p = subprocess.Popen(ecmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
p = subprocess.Popen(ecmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
stdout, stderr = p.communicate()
|
stdout, stderr = p.communicate()
|
||||||
ret = p.wait()
|
ret = p.wait()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user