aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/parsers.py
diff options
context:
space:
mode:
authorTom Christie2012-04-11 15:28:57 +0100
committerTom Christie2012-04-11 15:28:57 +0100
commit44df8345f3ffcba141ded3a1bd993971d7199164 (patch)
treed102b9c5faf06f599e8975a3b4346907568dd600 /djangorestframework/parsers.py
parent44b5d6120341c5fb90a0b3022d09f9ad78d9f836 (diff)
parente53c819cc7a5567f2c29375550e9ff62ec20d472 (diff)
downloaddjango-rest-framework-44df8345f3ffcba141ded3a1bd993971d7199164.tar.bz2
Merge with master
Diffstat (limited to 'djangorestframework/parsers.py')
-rw-r--r--djangorestframework/parsers.py2
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)