diff options
author | Erik Johnston <erik@matrix.org> | 2015-01-07 14:34:00 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-01-07 14:34:00 +0000 |
commit | bacaa215eb2e1c11e50bbc3fb0e43e28a463458b (patch) | |
tree | 27510a6358b8bc219ccd456622b963a3b394bee3 /synapse/util/frozenutils.py | |
parent | Merge branch 'hotfixes-v0.6.0a' (diff) | |
parent | Improve change log (diff) | |
download | synapse-bacaa215eb2e1c11e50bbc3fb0e43e28a463458b.tar.xz |
Merge branch 'release-v0.6.1' of github.com:matrix-org/synapse v0.6.1
Diffstat (limited to 'synapse/util/frozenutils.py')
-rw-r--r-- | synapse/util/frozenutils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/util/frozenutils.py b/synapse/util/frozenutils.py index fcfb38b3b4..a13a2015e4 100644 --- a/synapse/util/frozenutils.py +++ b/synapse/util/frozenutils.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2014 OpenMarket Ltd +# Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -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: |