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):
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user