summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-11 17:10:22 +0000
committerErik Johnston <erik@matrix.org>2015-02-11 17:10:22 +0000
commit54fdbc7e50dfdd80eda563536d08bdfef079937c (patch)
tree9d28877f14b914af743629010be54a01477ffddc /synapse/util
parentAllow newer versions of syutil (diff)
parentBump syutil version (diff)
downloadsynapse-54fdbc7e50dfdd80eda563536d08bdfef079937c.tar.xz
Merge pull request #66 from matrix-org/use-simplejson
Use simplejson
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/frozenutils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/util/frozenutils.py b/synapse/util/frozenutils.py
index a13a2015e4..9e10d37aec 100644
--- a/synapse/util/frozenutils.py
+++ b/synapse/util/frozenutils.py
@@ -21,6 +21,9 @@ def freeze(o):
     if t is dict:
         return frozendict({k: freeze(v) for k, v in o.items()})
 
+    if t is frozendict:
+        return o
+
     if t is str or t is unicode:
         return o
 
@@ -33,10 +36,11 @@ def freeze(o):
 
 
 def unfreeze(o):
-    if isinstance(o, frozendict) or isinstance(o, dict):
+    t = type(o)
+    if t is dict or t is frozendict:
         return dict({k: unfreeze(v) for k, v in o.items()})
 
-    if isinstance(o, basestring):
+    if t is str or t is unicode:
         return o
 
     try: