Fix mail and signing defaults

This commit is contained in:
Joseph Schorr 2016-03-08 18:08:40 -05:00
parent 3b52a255b2
commit 8e1727b6d3
3 changed files with 20 additions and 4 deletions

View file

@ -1,5 +1,10 @@
import gpgme
import os
import features
import logging
logger = logging.getLogger(__name__)
from StringIO import StringIO
class GPG2Signer(object):
@ -61,7 +66,13 @@ class Signer(object):
if preference is None:
return None
return SIGNING_ENGINES[preference](app.config, key_directory)
if not features.ACI_CONVERSION:
return None
try:
return SIGNING_ENGINES[preference](app.config, key_directory)
except Exception:
logger.exception('Could not initialize signing engine')
def __getattr__(self, name):
return getattr(self.state, name, None)