summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-05-19 11:41:55 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-05-19 11:44:02 +0100
commite0037c54412a56819c6490977f8b16bd507434ef (patch)
treeaa640d1d8a13876d7560f961f9148c512ebceddf
parent224f61bf57da11af21dd3098eb8a46acbca8160a (diff)
downloadzuul-baserock/sam/tweaks.tar.gz
Give actual error message when getting a change from Gerrit failsbaserock/sam/tweaks
This makes it easier to debug configuration errors when using the `zuul` commandline tool. For example, if your zuul.conf points to an SSH key that doesn't exist, the error you would get before would be: zuul.rpcclient.RPCFailure: Invalid change: 37,1 The error you get after this patch is: zuul.rpcclient.RPCFailure: Invalid change: 37,1 ([Errno 2] No such file or directory: '/root/.ssh/id_rsa')
-rw-r--r--zuul/rpclistener.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/zuul/rpclistener.py b/zuul/rpclistener.py
index 05b8d033e..d6d791663 100644
--- a/zuul/rpclistener.py
+++ b/zuul/rpclistener.py
@@ -110,8 +110,8 @@ class RPCListener(object):
event.change_number, event.patch_number = args['change'].split(',')
try:
pipeline.source.getChange(event, project)
- except Exception:
- errors += 'Invalid change: %s\n' % (args['change'],)
+ except Exception as e:
+ errors += 'Invalid change: %s (%s)\n' % (args['change'], e)
if errors:
job.sendWorkException(errors.encode('utf8'))