diff options
| author | Tom Christie | 2013-02-04 21:35:47 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-02-04 21:35:47 +0000 | 
| commit | 7dc4bce4e2d8bd21ba383ae1d62fdacf4998742e (patch) | |
| tree | 7544827416d24edba3441c6227122b97746355e6 /rest_framework/parsers.py | |
| parent | 937ef008081fb20907494eb888e7374a8eb51a4f (diff) | |
| download | django-rest-framework-7dc4bce4e2d8bd21ba383ae1d62fdacf4998742e.tar.bz2 | |
Fix 2.6 compat
Diffstat (limited to 'rest_framework/parsers.py')
| -rw-r--r-- | rest_framework/parsers.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/rest_framework/parsers.py b/rest_framework/parsers.py index 98d63fec..06b02226 100644 --- a/rest_framework/parsers.py +++ b/rest_framework/parsers.py @@ -9,7 +9,7 @@ from django.conf import settings  from django.http import QueryDict  from django.http.multipartparser import MultiPartParser as DjangoMultiPartParser  from django.http.multipartparser import MultiPartParserError -from rest_framework.compat import yaml, ETParseError +from rest_framework.compat import yaml, ETParseError, ET_XMLParser  from rest_framework.exceptions import ParseError  from rest_framework.compat import six  from xml.etree import ElementTree as ET @@ -148,7 +148,7 @@ class XMLParser(BaseParser):      def parse(self, stream, media_type=None, parser_context=None):          parser_context = parser_context or {}          encoding = parser_context.get('encoding', settings.DEFAULT_CHARSET) -        parser = ET.XMLParser(encoding=encoding) +        parser = ET_XMLParser(encoding=encoding)          try:              tree = ET.parse(stream, parser=parser)          except (ExpatError, ETParseError, ValueError) as exc: | 
