use subprocess instead of os.system()
This commit is contained in:
parent
f8922005e0
commit
cf5c3568d4
|
@ -157,11 +157,12 @@ except ImportError:
|
||||||
HAVE_GPG = False
|
HAVE_GPG = False
|
||||||
else:
|
else:
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
gpg_cmd = 'gpg -h >nul 2>&1'
|
gpg_cmd = 'gpg -h >nul 2>&1'
|
||||||
else:
|
else:
|
||||||
gpg_cmd = 'gpg -h >/dev/null 2>&1'
|
gpg_cmd = 'gpg -h >/dev/null 2>&1'
|
||||||
if os.system(gpg_cmd):
|
if subprocess.call(gpg_cmd, shell=True):
|
||||||
HAVE_GPG = False
|
HAVE_GPG = False
|
||||||
|
|
||||||
# Depends on use_latex option. Will be correctly set after we config options are
|
# Depends on use_latex option. Will be correctly set after we config options are
|
||||||
|
|
Loading…
Reference in New Issue