diff options
| author | Tom Christie | 2012-04-11 15:28:57 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-04-11 15:28:57 +0100 |
| commit | 44df8345f3ffcba141ded3a1bd993971d7199164 (patch) | |
| tree | d102b9c5faf06f599e8975a3b4346907568dd600 /djangorestframework/parsers.py | |
| parent | 44b5d6120341c5fb90a0b3022d09f9ad78d9f836 (diff) | |
| parent | e53c819cc7a5567f2c29375550e9ff62ec20d472 (diff) | |
| download | django-rest-framework-44df8345f3ffcba141ded3a1bd993971d7199164.tar.bz2 | |
Merge with master
Diffstat (limited to 'djangorestframework/parsers.py')
| -rw-r--r-- | djangorestframework/parsers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/parsers.py b/djangorestframework/parsers.py index fc4450b7..0eb72f38 100644 --- a/djangorestframework/parsers.py +++ b/djangorestframework/parsers.py @@ -104,7 +104,7 @@ class YAMLParser(BaseParser): """ try: return (yaml.safe_load(stream), None) - except ValueError, exc: + except (ValueError, yaml.parser.ParserError), exc: raise ImmediateResponse( {'detail': 'YAML parse error - %s' % unicode(exc)}, status=status.HTTP_400_BAD_REQUEST) |
