(self)
Writes all objects matching
Writes all objects matching
Writes all objects matching
def export(self):
        """ Writes all objects matching
        """
        try:
            self.collect_data()

            data = list(chain(*self.to_serialize))

            CurrentSerializer = serializers.get_serializer(self.format)
            serializer = CurrentSerializer()

            with open(self.target_file, "w") as out:
                serializer.serialize(data, indent=self.indent, stream=out)
        except Exception as e:
            if self.show_traceback:
                raise
            raise CommandError("Unable to serialize database: %s" % e)
def export ( self ) : try : self . collect_data ( ) data = list ( chain ( * self . to_serialize ) ) CurrentSerializer = serializers . get_serializer ( self . format ) serializer = CurrentSerializer ( ) with open ( self . target_file , "w" ) as out : serializer . serialize ( data , indent = self . indent , stream = out ) except Exception as e : if self . show_traceback : raise raise CommandError ( "Unable to serialize database: %s" % e )