summaryrefslogtreecommitdiff
path: root/django/utils/regex_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/regex_helper.py')
-rw-r--r--django/utils/regex_helper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/regex_helper.py b/django/utils/regex_helper.py
index e910cac4aa..8612475b96 100644
--- a/django/utils/regex_helper.py
+++ b/django/utils/regex_helper.py
@@ -341,7 +341,7 @@ def _lazy_re_compile(regex, flags=0):
"""Lazily compile a regex with flags."""
def _compile():
# Compile the regex if it was not passed pre-compiled.
- if isinstance(regex, str):
+ if isinstance(regex, (str, bytes)):
return re.compile(regex, flags)
else:
assert not flags, (