[elghinn] Cleaner way to check if we have gpg
This commit is contained in:
parent
8b8f139f79
commit
0ca9610680
1 changed files with 2 additions and 4 deletions
|
@ -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('@')
|
||||||
|
|
Loading…
Add table
Reference in a new issue