diff options
author | Jannis Leidel <jannis@leidel.info> | 2012-02-10 01:13:38 +0000 |
---|---|---|
committer | Jannis Leidel <jannis@leidel.info> | 2012-02-10 01:13:38 +0000 |
commit | 7019123d21f202bfce54ad30eb33ae9f4b3bcef9 (patch) | |
tree | 9ff1022c4196036eda6b6a10c1e606b4c00ca567 /django/core/serializers/json.py | |
parent | c1acda6d8f276dda9a962186e028c396a5a2e53c (diff) | |
download | django-7019123d21f202bfce54ad30eb33ae9f4b3bcef9.tar.gz |
Fixed the exception handling when deserializing via generators on Python 2.5 that was introduced in r17469. Also only test the YAML serializer if PyYAML is installed.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/serializers/json.py')
-rw-r--r-- | django/core/serializers/json.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/core/serializers/json.py b/django/core/serializers/json.py index ce7cdb3179..91af84e9ca 100644 --- a/django/core/serializers/json.py +++ b/django/core/serializers/json.py @@ -40,6 +40,8 @@ def Deserializer(stream_or_string, **options): try: for obj in PythonDeserializer(simplejson.load(stream), **options): yield obj + except GeneratorExit: + raise except Exception, e: # Map to deserializer error raise DeserializationError(e) |