use subprocess instead of os.system()

This commit is contained in:
Yann Leboulanger 2011-12-17 18:07:56 +01:00
parent f8922005e0
commit cf5c3568d4
1 changed files with 2 additions and 1 deletions

View File

@ -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