This commit is contained in:
Kovid Goyal 2017-09-07 20:40:38 +05:30
parent 84b853dca8
commit 099f99a386
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -106,13 +106,13 @@ def decode_output(raw):
def run(cmd):
from calibre.gui2 import sanitize_env_vars
ecmd = list(map(encode_arg, cmd))
if DEBUG:
try:
print(ecmd)
except Exception:
pass
with sanitize_env_vars():
ecmd = list(map(encode_arg, cmd))
if DEBUG:
try:
print(ecmd)
except Exception:
pass
p = subprocess.Popen(ecmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
ret = p.wait()