aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/parsers.py
diff options
context:
space:
mode:
authorTom Christie2013-02-04 21:35:47 +0000
committerTom Christie2013-02-04 21:35:47 +0000
commit7dc4bce4e2d8bd21ba383ae1d62fdacf4998742e (patch)
tree7544827416d24edba3441c6227122b97746355e6 /rest_framework/parsers.py
parent937ef008081fb20907494eb888e7374a8eb51a4f (diff)
downloaddjango-rest-framework-7dc4bce4e2d8bd21ba383ae1d62fdacf4998742e.tar.bz2
Fix 2.6 compat
Diffstat (limited to 'rest_framework/parsers.py')
-rw-r--r--rest_framework/parsers.py4
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: