From cc1a4f031c5cefa15bb06986254e696ad5734fbb Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 10 Jul 2007 12:02:06 +0000 Subject: [PATCH] Fixed #4823 -- Fixed a Python 2.3 incompatibility from [5636] (it was even demonstrated by existing tests, so I really screwed this up). git-svn-id: http://code.djangoproject.com/svn/django/trunk@5641 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/urlresolvers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py index 7e4f4c8431e..8e2af52464d 100644 --- a/django/core/urlresolvers.py +++ b/django/core/urlresolvers.py @@ -231,7 +231,8 @@ class RegexURLResolver(object): if sub_match: sub_match_dict = dict([(smart_str(k), v) for k, v in match.groupdict().items()]) sub_match_dict.update(self.default_kwargs) - sub_match_dict.update([(smart_str(k), v) for k, v in sub_match[2].items()]) + for k, v in sub_match[2].iteritems(): + sub_match_dict[smart_str(k)] = v return sub_match[0], sub_match[1], sub_match_dict tried.append(pattern.regex.pattern) raise Resolver404, {'tried': tried, 'path': new_path}