1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #5268: the YAML serializer now uses yaml.safe_dump() instead the plain yaml.dump(); this makes YAML dumps more portable, and also removes the crufty '!!python/unicode' business. Thanks, poelzi.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss
2007-12-04 20:31:34 +00:00
parent 35921e570b
commit 76b73ce725
2 changed files with 39 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ class Serializer(PythonSerializer):
def end_serialization(self):
self.options.pop('stream', None)
self.options.pop('fields', None)
yaml.dump(self.objects, self.stream, **self.options)
yaml.safe_dump(self.objects, self.stream, **self.options)
def getvalue(self):
return self.stream.getvalue()