Skip to content
Browse files

newforms: Tiny optimization to smart_unicode()

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6dd4e6d commit 820d940355da7ac50c49140ec95242085fab04e6 @adrianholovaty adrianholovaty committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/newforms/
2 django/newforms/
@@ -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.
Something went wrong with that request. Please try again.