summary refs log tree commit diff
path: root/synapse/appservice/__init__.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-09 23:40:44 +0100
committerGitHub <noreply@github.com>2018-04-09 23:40:44 +0100
commit8eaa141d8f1ffb4a437bc9e9220febde51e3497e (patch)
tree736679fd840ff67f9844dc99b9be7db0c6b71623 /synapse/appservice/__init__.py
parentMerge pull request #3016 from silkeh/improve-service-lookups (diff)
parentReplace some type checks with six type checks (diff)
downloadsynapse-8eaa141d8f1ffb4a437bc9e9220febde51e3497e.tar.xz
Merge pull request #3075 from NotAFile/six-type-checks
Replace some type checks with six type checks
Diffstat (limited to 'synapse/appservice/__init__.py')
-rw-r--r--synapse/appservice/__init__.py4
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(