summaryrefslogtreecommitdiff
path: root/django/utils/regex_helper.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-07-20 14:22:00 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-07-22 09:29:54 +0200
commit3cb2457f46b3e40ff6b6acffcb3fd44cbea091e5 (patch)
tree68e43a061f1a7a122c02d5c5b39586b32959a9dc /django/utils/regex_helper.py
parentcacd845996d1245f6aed257bff5f748f46206d3f (diff)
downloaddjango-3cb2457f46b3e40ff6b6acffcb3fd44cbea091e5.tar.gz
[py3] Replaced basestring by six.string_types.
Diffstat (limited to 'django/utils/regex_helper.py')
-rw-r--r--django/utils/regex_helper.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/utils/regex_helper.py b/django/utils/regex_helper.py
index 4b8ecea721..8953a21e95 100644
--- a/django/utils/regex_helper.py
+++ b/django/utils/regex_helper.py
@@ -7,6 +7,8 @@ should be good enough for a large class of URLS, however.
"""
from __future__ import unicode_literals
+from django.utils import six
+
# Mapping of an escape character to a representative of that class. So, e.g.,
# "\w" is replaced by "x" in a reverse URL. A value of None means to ignore
# this sequence. Any missing key is mapped to itself.
@@ -302,7 +304,7 @@ def flatten_result(source):
result_args = [[]]
pos = last = 0
for pos, elt in enumerate(source):
- if isinstance(elt, basestring):
+ if isinstance(elt, six.string_types):
continue
piece = ''.join(source[last:pos])
if isinstance(elt, Group):