Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _convert_object_to_feed_entry(obj, rootName, content_writer):
updated_str = datetime.utcnow().isoformat()
if datetime.utcnow().utcoffset() is None:
updated_str += '+00:00'
writer = _XmlWriter()
writer.preprocessor('')
writer.start('entry', [
('xmlns:d', _XmlSchemas.DataServices, None),
('xmlns:m', _XmlSchemas.DataServicesMetadata, None),
('xmlns', _XmlSchemas.Atom, None),
])
writer.element('title', '')
writer.element('updated', updated_str)
writer.start('author')
writer.element('name', '')
writer.end('author')
writer.element('id', '')
writer.start('content', [('type', 'application/xml', None)])
writer.start(rootName, [
('xmlns:i', _XmlSchemas.SchemaInstance, None),