From 820d940355da7ac50c49140ec95242085fab04e6 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 16 Nov 2006 06:47:08 +0000 Subject: [PATCH] newforms: Tiny optimization to smart_unicode() git-svn-id: http://code.djangoproject.com/svn/django/trunk@4077 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/newforms/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/newforms/util.py b/django/newforms/util.py index 6b101fc152d..a5cc4932ea8 100644 --- a/django/newforms/util.py +++ b/django/newforms/util.py @@ -4,7 +4,7 @@ DEFAULT_ENCODING = 'utf-8' # TODO: First look at django.conf.settings, then fall 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