aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--djangorestframework/parsers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/djangorestframework/parsers.py b/djangorestframework/parsers.py
index 168d391e..41f15aa3 100644
--- a/djangorestframework/parsers.py
+++ b/djangorestframework/parsers.py
@@ -108,7 +108,8 @@ if yaml:
except ValueError, exc:
raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
{'detail': 'YAML parse error - %s' % unicode(exc)})
-
+else:
+ YAMLParser = None
class PlainTextParser(BaseParser):
"""