Ticket #14888: rem_code_dup.diff

File rem_code_dup.diff, 1.8 KB (added by eric.fortin2@…, 14 years ago)

patch

  • django/core/serializers/json.py

     
    1818    internal_use_only = False
    1919
    2020    def end_serialization(self):
    21         self.options.pop('stream', None)
    22         self.options.pop('fields', None)
    23         self.options.pop('use_natural_keys', None)
    2421        simplejson.dump(self.objects, self.stream, cls=DjangoJSONEncoder, **self.options)
    2522
    2623    def getvalue(self):
  • django/core/serializers/base.py

     
    3131        """
    3232        self.options = options
    3333
    34         self.stream = options.get("stream", StringIO())
    35         self.selected_fields = options.get("fields")
    36         self.use_natural_keys = options.get("use_natural_keys", False)
     34        self.stream = options.pop("stream", StringIO())
     35        self.selected_fields = options.pop("fields", None)
     36        self.use_natural_keys = options.pop("use_natural_keys", False)
    3737
    3838        self.start_serialization()
    3939        for obj in queryset:
  • django/core/serializers/pyyaml.py

     
    3838            super(Serializer, self).handle_field(obj, field)
    3939
    4040    def end_serialization(self):
    41         self.options.pop('stream', None)
    42         self.options.pop('fields', None)
    43         self.options.pop('use_natural_keys', None)
    4441        yaml.dump(self.objects, self.stream, Dumper=DjangoSafeDumper, **self.options)
    4542
    4643    def getvalue(self):
Back to Top