diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-05-03 14:59:29 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-05-03 14:59:29 +0100 |
commit | 093d8c415a303fa7c8900e3fe685843b60a85eed (patch) | |
tree | 8dd5ceabb4c8ecbae18fa95f10108ba335c6bbbf /contrib/graph/graph3.py | |
parent | Make 'unexpected logging context' into warnings (diff) | |
parent | Merge pull request #3183 from matrix-org/rav/moar_logcontext_leaks (diff) | |
download | synapse-093d8c415a303fa7c8900e3fe685843b60a85eed.tar.xz |
Merge remote-tracking branch 'origin/develop' into rav/warn_on_logcontext_fail
Diffstat (limited to 'contrib/graph/graph3.py')
-rw-r--r-- | contrib/graph/graph3.py | 4 |
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) |