aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/parsers.py
diff options
context:
space:
mode:
authorTom Christie2013-12-13 16:32:34 +0000
committerTom Christie2013-12-13 16:32:34 +0000
commit9c41c007afc71c899306bcb02e40bdfc36b09146 (patch)
treeca0da04aed0c1b96ddf14a801dc54b5a72a72461 /rest_framework/parsers.py
parented931b90ae9e72f963673e6e188b1802a5a65360 (diff)
parentca244ad614e2f6fb4fef1dc9987be996d2624303 (diff)
downloaddjango-rest-framework-9c41c007afc71c899306bcb02e40bdfc36b09146.tar.bz2
Merge branch 'master' into 2.4.0
Conflicts: .travis.yml docs/api-guide/routers.md docs/topics/release-notes.md rest_framework/compat.py
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 98fc0341..f1b3e38d 100644
--- a/rest_framework/parsers.py
+++ b/rest_framework/parsers.py
@@ -83,7 +83,7 @@ class YAMLParser(BaseParser):
data = stream.read().decode(encoding)
return yaml.safe_load(data)
except (ValueError, yaml.parser.ParserError) as exc:
- raise ParseError('YAML parse error - %s' % six.u(exc))
+ raise ParseError('YAML parse error - %s' % six.text_type(exc))
class FormParser(BaseParser):
@@ -153,7 +153,7 @@ class XMLParser(BaseParser):
try:
tree = etree.parse(stream, parser=parser, forbid_dtd=True)
except (etree.ParseError, ValueError) as exc:
- raise ParseError('XML parse error - %s' % six.u(exc))
+ raise ParseError('XML parse error - %s' % six.text_type(exc))
data = self._xml_convert(tree.getroot())
return data