[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:
HAVE_GPG = False
else:
import os
status = os.system('gpg -h >/dev/null 2>&1')
if status != 0:
from os import system
if system('gpg -h >/dev/null 2>&1'):
HAVE_GPG = False
del status
def get_nick_from_jid(jid):
pos = jid.find('@')