diff options
| author | Tom Christie | 2013-12-09 09:24:10 +0000 |
|---|---|---|
| committer | Tom Christie | 2013-12-09 09:24:10 +0000 |
| commit | ddd17c69e7abdd70448fa0f2f2a807d600b3391d (patch) | |
| tree | bc97457158092f8e7dcc970e5308f8e8d9b63361 /rest_framework/utils/encoders.py | |
| parent | a6ca943faa42af30075e260a01d7e672f706d3fd (diff) | |
| download | django-rest-framework-ddd17c69e7abdd70448fa0f2f2a807d600b3391d.tar.bz2 | |
Fix compat issues for #1231
Diffstat (limited to 'rest_framework/utils/encoders.py')
| -rw-r--r-- | rest_framework/utils/encoders.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rest_framework/utils/encoders.py b/rest_framework/utils/encoders.py index 22b1ab3d..3ac920c6 100644 --- a/rest_framework/utils/encoders.py +++ b/rest_framework/utils/encoders.py @@ -47,8 +47,7 @@ class JSONEncoder(json.JSONEncoder): elif hasattr(o, '__getitem__'): try: return dict(o) - except KeyError: - # Couldn't convert to a dict, fall through + except: pass elif hasattr(o, '__iter__'): return [i for i in o] |
