Skip to content

Commit

Permalink
use force_text instead of force_unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Apr 8, 2013
1 parent 61d1286 commit e4e8388
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions debug_toolbar/utils/tracking/db.py
Expand Up @@ -5,20 +5,20 @@

from django.conf import settings
from django.template import Node
from django.utils.encoding import force_unicode, smart_str
from django.utils.encoding import force_text, smart_str

from debug_toolbar.utils import ms_from_timedelta, tidy_stacktrace, \
get_template_info, get_stack
from debug_toolbar.utils.compat.db import connections

try:
import json
except ImportError: # python < 2.6
except ImportError: # python < 2.6
from django.utils import simplejson as json

try:
from hashlib import sha1
except ImportError: # python < 2.5
except ImportError: # python < 2.5
from django.utils.hashcompat import sha_constructor as sha1

# TODO:This should be set in the toolbar loader as a default and panels should
Expand Down Expand Up @@ -93,7 +93,7 @@ def _quote_params(self, params):

def _decode(self, param):
try:
return force_unicode(param, strings_only=True)
return force_text(param, strings_only=True)
except UnicodeDecodeError:
return '(encoded string)'

Expand Down

0 comments on commit e4e8388

Please sign in to comment.