Skip to content

Commit 517ae7d

Browse files
James Gututim-schilling
authored andcommitted
added comment to sanitize.py
1 parent 07b057b commit 517ae7d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

debug_toolbar/sanitize.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
from django.utils.encoding import DjangoUnicodeDecodeError, force_str as force_string
22

33

4-
# def force_str(s, encoding="utf-8", strings_only=False, errors="strict"):
5-
# try:
6-
# return force_string(s, encoding, strings_only, errors)
7-
# except DjangoUnicodeDecodeError:
8-
# return "Django Debug Toolbar was unable to parse value."
9-
104
def force_str(s, *args, **kwargs):
5+
'''
6+
Forces values to strings.
7+
Will return "Django Debug Toolbar was unable to parse value." when there's a decoding error.
8+
'''
119
try:
1210
return force_string(s, *args, **kwargs)
1311
except DjangoUnicodeDecodeError:

0 commit comments

Comments
 (0)