[elghinn] Cleaner way to check if we have gpg

This commit is contained in:
Jean-Marie Traissard 2008-04-20 18:40:59 +00:00
parent 8b8f139f79
commit 0ca9610680

View file

@ -160,11 +160,9 @@ try:
except ImportError: except ImportError:
HAVE_GPG = False HAVE_GPG = False
else: else:
import os from os import system
status = os.system('gpg -h >/dev/null 2>&1') if system('gpg -h >/dev/null 2>&1'):
if status != 0:
HAVE_GPG = False HAVE_GPG = False
del status
def get_nick_from_jid(jid): def get_nick_from_jid(jid):
pos = jid.find('@') pos = jid.find('@')