aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2015-03-10 15:13:56 -0700
committerBrian Dolbec <dolsen@gentoo.org>2015-03-10 15:13:56 -0700
commit24e501c6dd471b69d262b27f254c197afcefc847 (patch)
tree61b81320d84ccd56ef265b4cefd7decf33f5d22d /gkeys-gen
parentgkeys: Fix setting deafault location of homedir (diff)
downloadgentoo-keys-24e501c6dd471b69d262b27f254c197afcefc847.tar.gz
gentoo-keys-24e501c6dd471b69d262b27f254c197afcefc847.tar.bz2
gentoo-keys-24e501c6dd471b69d262b27f254c197afcefc847.zip
gkeys-gen: Improve output by stating the error that occurred
The debug output in the log is not obvious, so stating it as well as the log file should help.
Diffstat (limited to 'gkeys-gen')
-rw-r--r--gkeys-gen/gkeygen/actions.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gkeys-gen/gkeygen/actions.py b/gkeys-gen/gkeygen/actions.py
index 649eed7..0bc34cd 100644
--- a/gkeys-gen/gkeygen/actions.py
+++ b/gkeys-gen/gkeygen/actions.py
@@ -27,6 +27,7 @@ else:
_unicode = unicode
from gkeys.fileops import ensure_dirs
+from gkeys import log
Action_Map = OrderedDict([
@@ -174,8 +175,10 @@ class Actions(object):
result = ctx.genkey(key_params)
except gpgme.GpgmeError as e:
self.logger.debug("MAIN: _action_genkey: GpgmeError: %s" % str(e))
- self.logger.debug("MAIN: _action_genkey: Aborting... Failed to get a password.")
- messages.extend(['', "Aborting... Failed to get a password."])
+ self.logger.debug("MAIN: _action_genkey: Aborting... Gpgme errored out.")
+ messages.extend(['', "Aborting... Gpgme reported an error.\n",
+ " GpgmeError: %s\n" % str(e),
+ " See the log file for details: %s" % log.logname])
return (False, messages)
key = ctx.get_key(result.fpr, True)
self.logger.debug("MAIN: _action_genkey: Generated key: %s - %s"