Permalink
Browse files

Fixed unicode error in generating debugerror (closes #26).

The web.net.websafe function works on strings, not on unicode. I wrote a
unicode version of that in template.py. Using that as filter for debugerror
template fixed the problem.
  • Loading branch information...
1 parent 75dcc97 commit fdda96d5c0e7076af2897708a7afb2c394726a68 @anandology anandology committed Nov 10, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 web/debugerror.py
View
@@ -11,8 +11,8 @@
__all__ = ["debugerror", "djangoerror", "emailerrors"]
import sys, urlparse, pprint, traceback
-from net import websafe
from template import Template
+from template import websafe as uwebsafe
from utils import sendmail, safestr
import webapi as web
@@ -287,7 +287,7 @@ def prettify(x):
global djangoerror_r
if djangoerror_r is None:
- djangoerror_r = Template(djangoerror_t, filename=__file__, filter=websafe)
+ djangoerror_r = Template(djangoerror_t, filename=__file__, filter=uwebsafe)
t = djangoerror_r
globals = {'ctx': web.ctx, 'web':web, 'dict':dict, 'str':str, 'prettify': prettify}

0 comments on commit fdda96d

Please sign in to comment.