diff options
author | Erik Johnston <erik@matrix.org> | 2015-01-07 09:45:42 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-01-07 09:45:42 +0000 |
commit | 6536161e2a5e1d338475921407d7ce3fa07cc45c (patch) | |
tree | 6e24afc0c9f112674e26662e470a178e60c955c4 /synapse/util/frozenutils.py | |
parent | Merge branch 'master' into develop (diff) | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj-perf (diff) | |
download | synapse-6536161e2a5e1d338475921407d7ce3fa07cc45c.tar.xz |
Merge branch 'erikj-perf' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/util/frozenutils.py')
-rw-r--r-- | synapse/util/frozenutils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/util/frozenutils.py b/synapse/util/frozenutils.py index 061f79d79d..a13a2015e4 100644 --- a/synapse/util/frozenutils.py +++ b/synapse/util/frozenutils.py @@ -17,10 +17,11 @@ from frozendict import frozendict def freeze(o): - if isinstance(o, dict) or isinstance(o, frozendict): + t = type(o) + if t is dict: return frozendict({k: freeze(v) for k, v in o.items()}) - if isinstance(o, basestring): + if t is str or t is unicode: return o try: |