Browse files

newforms: Tiny optimization to smart_unicode()

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6dd4e6d commit 820d940355da7ac50c49140ec95242085fab04e6 @adrianholovaty adrianholovaty committed Nov 16, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/newforms/util.py
View
2 django/newforms/util.py
@@ -4,7 +4,7 @@
def smart_unicode(s):
if not isinstance(s, basestring):
s = unicode(str(s))
- if not isinstance(s, unicode):
+ elif not isinstance(s, unicode):
s = unicode(s, DEFAULT_ENCODING)
return s

0 comments on commit 820d940

Please sign in to comment.