aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/utils/tracking
diff options
context:
space:
mode:
authorAymeric Augustin2013-10-26 14:06:21 +0200
committerAymeric Augustin2013-10-26 14:15:23 +0200
commit8525bfc7fb2e868edf24fb5c6fea00bc871d7489 (patch)
tree548b38900a9d1ba0c8b189fd6642936278f366b6 /debug_toolbar/utils/tracking
parent3a5492b471d907bdb66c627914264ee1f2d4e537 (diff)
downloaddjango-debug-toolbar-8525bfc7fb2e868edf24fb5c6fea00bc871d7489.tar.bz2
Don't crash on non ascii bytestrings in db params.
Thanks Karen Tracey for the report. Fix #422.
Diffstat (limited to 'debug_toolbar/utils/tracking')
-rw-r--r--debug_toolbar/utils/tracking/db.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/debug_toolbar/utils/tracking/db.py b/debug_toolbar/utils/tracking/db.py
index b6bbb66..b4ceff0 100644
--- a/debug_toolbar/utils/tracking/db.py
+++ b/debug_toolbar/utils/tracking/db.py
@@ -73,8 +73,7 @@ class NormalCursorWrapper(object):
def _quote_expr(self, element):
if isinstance(element, six.string_types):
- element = element.replace("'", "''")
- return "'%s'" % element
+ return "'%s'" % force_text(element).replace("'", "''")
else:
return repr(element)