Test if exception has faultString attribute before using it for issue1129

This commit is contained in:
Cédric Krier committed 2009-08-17 11:01:11 +02:00
1 parent 763053ce72
commit be6ee858bf
1 file changed
+2 -1
+2 -1
View File
@@ -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)