Test if exception has faultString attribute before using it for issue1129
This commit is contained in:
1 parent
763053ce72
commit
be6ee858bf
1 file changed
+2
-1
@@ -572,7 +572,8 @@ 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:
|
||||
if hasattr(exception, 'faultString') \
|
||||
and 'roundup.cgi.exceptions.Unauthorised' in exception.faultString:
|
||||
message(_('Connection error!\n' \
|
||||
'Bad username or password!'), parent)
|
||||
return send_bugtracker(msg, parent)
|
||||
|
||||
Reference in new issue
Block a user