diff options
author | Adrian Tschira <nota@notafile.com> | 2018-04-07 00:37:36 +0200 |
---|---|---|
committer | Adrian Tschira <nota@notafile.com> | 2018-04-07 01:02:32 +0200 |
commit | e54c202b81707ef02b2e640489a69c2b266bebff (patch) | |
tree | 5418a0b3627ae1c880d19e58e839582b9c7a0331 /synapse/appservice | |
parent | Merge pull request #3046 from matrix-org/dbkr/join_group (diff) | |
download | synapse-e54c202b81707ef02b2e640489a69c2b266bebff.tar.xz |
Replace some type checks with six type checks
Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/appservice')
-rw-r--r-- | synapse/appservice/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/appservice/__init__.py b/synapse/appservice/__init__.py index d5a7a5ce2f..5fdb579723 100644 --- a/synapse/appservice/__init__.py +++ b/synapse/appservice/__init__.py @@ -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( |