summary refs log tree commit diff
path: root/contrib/graph/graph3.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 /contrib/graph/graph3.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 'contrib/graph/graph3.py')
-rw-r--r--contrib/graph/graph3.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/graph/graph3.py b/contrib/graph/graph3.py
index 88d92c89d7..7d3b4d7eb6 100644
--- a/contrib/graph/graph3.py
+++ b/contrib/graph/graph3.py
@@ -22,6 +22,8 @@ import argparse
 from synapse.events import FrozenEvent
 from synapse.util.frozenutils import unfreeze
 
+from six import string_types
+
 
 def make_graph(file_name, room_id, file_prefix, limit):
     print "Reading lines"
@@ -58,7 +60,7 @@ def make_graph(file_name, room_id, file_prefix, limit):
         for key, value in unfreeze(event.get_dict()["content"]).items():
             if value is None:
                 value = "<null>"
-            elif isinstance(value, basestring):
+            elif isinstance(value, string_types):
                 pass
             else:
                 value = json.dumps(value)