Test for Unauthorised exception from roundup to loop on popup for issue937

This commit is contained in:
Cédric Krier
2009-04-08 00:57:14 +02:00
parent 01326d65c9
commit c4a371e98c
+4
View File
@@ -561,6 +561,10 @@ def send_bugtracker(msg, parent):
'issue%s' % issue_id, parent)
webbrowser.open(CONFIG['roundup.url'] + 'issue%s' % issue_id, new=2)
except Exception, exception:
if 'roundup.cgi.exceptions.Unauthorised' in exception.faultString:
message(_('Connection error!\n' \
'Bad username or password!'), parent)
return send_bugtracker(msg, parent)
tb_s = reduce(lambda x, y: x + y,
traceback.format_exception(sys.exc_type,
sys.exc_value, sys.exc_traceback))