Module: check_mk
Branch: master
Commit: 30d367044cafe0b0ac03b74f55f21393b8985c7a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=30d367044cafe0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 18 17:28:50 2013 +0200
index.py: handle exceptions with non-ascii characters
---
web/htdocs/index.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 81fd8a8..763f3c3 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -350,7 +350,7 @@ def handler(req, profiling = True):
html.write(_("User error") + ": %s\n" % e)
elif not fail_silently:
html.header("Invalid User Input")
- html.show_error(str(e))
+ html.show_error(unicode(e))
html.footer()
except MKAuthException, e:
@@ -358,7 +358,7 @@ def handler(req, profiling = True):
html.write(_("Authentication error") + ": %s\n" % e)
elif not fail_silently:
html.header(_("Permission denied"))
- html.show_error(str(e))
+ html.show_error(unicode(e))
html.footer()
except MKUnauthenticatedException, e:
@@ -366,7 +366,7 @@ def handler(req, profiling = True):
html.write(_("Missing authentication credentials") + ":
%s\n" % e)
elif not fail_silently:
html.header(_("Not authenticated"))
- html.show_error(str(e))
+ html.show_error(unicode(e))
html.footer()
response_code = apache.HTTP_UNAUTHORIZED
@@ -375,7 +375,7 @@ def handler(req, profiling = True):
html.write(_("Configuration error") + ": %s\n" % e)
elif not fail_silently:
html.header(_("Configuration Error"))
- html.show_error(str(e))
+ html.show_error(unicode(e))
html.footer()
apache.log_error(_("Configuration error: %s") % (e,),
apache.APLOG_ERR)
@@ -384,7 +384,7 @@ def handler(req, profiling = True):
html.write(_("General error") + ": %s\n" % e)
elif not fail_silently:
html.header(_("Error"))
- html.show_error(str(e))
+ html.show_error(unicode(e))
html.footer()
# apache.log_error(_("Error: %s") % (e,), apache.APLOG_ERR)