From 65c56edb5cabea51f65b121e3bcc0a28122ebe5b Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 3 Dec 2012 15:04:34 -0500 Subject: [PATCH] Better error logging when login into queue fails --- common/lib/capa/capa/xqueue_interface.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index f145cad23c..798867955b 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -81,7 +81,11 @@ class XQueueInterface(object): # Log in, then try again if error and (msg == 'login_required'): - self._login() + (error, content) = self._login() + if error != 0: + # when the login fails + log.debug("Failed to login to queue: %s", content) + return (error, content) if files_to_upload is not None: # Need to rewind file pointers for f in files_to_upload: