This commit is contained in:
Gabriel Falcão
2016-01-18 08:54:29 -05:00
parent 7e57dee713
commit d54939ec21

View File

@@ -802,8 +802,9 @@ class URIMatcher(object):
def __init__(self, uri, entries, match_querystring=False, priority=0):
self._match_querystring = match_querystring
# CPython, Jython
if type(uri).__name__ in ('SRE_Pattern',
'org.python.modules.sre.PatternObject'):
regex_types = ('SRE_Pattern', 'org.python.modules.sre.PatternObject')
is_regex = type(uri).__name__ in regex_types
if is_regex:
self.regex = uri
result = urlsplit(uri.pattern)
if result.scheme == 'https':