Avoid error if pyme3 isn't installed

pull/30/head
Raphaël Vinot 2016-11-17 17:30:17 +01:00
parent 419897aba0
commit b8a391d263
1 changed files with 7 additions and 6 deletions

View File

@ -24,12 +24,13 @@ try:
from gpg.constants.sig import mode from gpg.constants.sig import mode
has_pyme = True has_pyme = True
except ImportError: except ImportError:
# pyme renamed to gpg the 2016-10-28 try:
import pyme as gpg # pyme renamed to gpg the 2016-10-28
from pyme.constants.sig import mode import pyme as gpg
has_pyme = True from pyme.constants.sig import mode
except ImportError: has_pyme = True
has_pyme = False except ImportError:
has_pyme = False
from .exceptions import PyMISPError, NewEventError, NewAttributeError from .exceptions import PyMISPError, NewEventError, NewAttributeError