From 1680b9ccfc370014dec1d9d8c37915383a989d45 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 15 May 2015 17:00:52 -0400 Subject: [PATCH] Improve error message when GPG is now found during initialization. Issues #168 and #98 --- mayan/apps/django_gpg/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mayan/apps/django_gpg/api.py b/mayan/apps/django_gpg/api.py index a577c455ab..aeb79514b9 100644 --- a/mayan/apps/django_gpg/api.py +++ b/mayan/apps/django_gpg/api.py @@ -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.