mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-26 00:20:52 -04:00
Replace some type checks with six type checks
Signed-off-by: Adrian Tschira <nota@notafile.com>
This commit is contained in:
parent
135fc5b9cd
commit
e54c202b81
5 changed files with 18 additions and 8 deletions
|
@ -21,6 +21,8 @@ from twisted.internet import defer
|
|||
import logging
|
||||
import re
|
||||
|
||||
from six import string_types
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -146,7 +148,7 @@ class ApplicationService(object):
|
|||
)
|
||||
|
||||
regex = regex_obj.get("regex")
|
||||
if isinstance(regex, basestring):
|
||||
if isinstance(regex, string_types):
|
||||
regex_obj["regex"] = re.compile(regex) # Pre-compile regex
|
||||
else:
|
||||
raise ValueError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue