From be6ee858bf1b413560d4e25a0124661f2c5a2acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 17 Aug 2009 11:01:11 +0200 Subject: [PATCH] Test if exception has faultString attribute before using it for issue1129 --- tryton/common/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/common/common.py b/tryton/common/common.py index ac66bccf31..e494cf17ab 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -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)