Improve error message when GPG is now found during initialization. Issues #168 and #98

This commit is contained in:
Roberto Rosario
2015-05-15 17:00:52 -04:00
parent c36baa3bfa
commit 1680b9ccfc

View File

@@ -127,9 +127,12 @@ class GPG(object):
try:
self.gpg = gnupg.GPG(**kwargs)
except OSError as exception:
raise GPGException('ERROR: GPG initialization error; Make sure the GPG binary is properly installed; %s' % exception)
except Exception as exception:
raise GPGException('ERROR: GPG initialization error; %s' % exception)
def verify_file(self, file_input, detached_signature=None, fetch_key=False):
"""
Verify the signature of a file.