diff roundup/cgi/client.py @ 4898:850551a1568b

Fix issue2550843 (AttributeError: 'Unauthorised' object has no attribute 'replace') Pass text of Unauthorised and Login exceptions instead of the exception instance to avoid traceback with string operations. str() is used in most other places where the exception error message text is needed. So far only roundup.cgi.actions.LoginAction.handle() iterates over the exception args. Probably not needed here, so I decided to keep the code simple.
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 26 May 2014 16:14:07 +0200
parents ca692423e401
children 48d93e98be7b
line wrap: on
line diff
--- a/roundup/cgi/client.py	Mon May 12 14:40:53 2014 +1000
+++ b/roundup/cgi/client.py	Mon May 26 16:14:07 2014 +0200
@@ -531,11 +531,11 @@
                                "Basic realm=\"%s\"" % realm)
             else:
                 self.response_code = http_.client.FORBIDDEN
-            self.renderFrontPage(message)
+            self.renderFrontPage(str(message))
         except Unauthorised, message:
             # users may always see the front page
             self.response_code = 403
-            self.renderFrontPage(message)
+            self.renderFrontPage(str(message))
         except NotModified:
             # send the 304 response
             self.response_code = 304

Roundup Issue Tracker: http://roundup-tracker.org/