def upload(self, href, vobject_item):
if self.is_fake:<EOL><INDENT>return<EOL><DEDENT>content = vobject_item.serialize()<EOL>try:<EOL><INDENT>item = self.get(href)<EOL>etesync_item = item.etesync_item<EOL>etesync_item.content = content<EOL><DEDENT>except api.exceptions.DoesNotExist:<EOL><INDENT>etesync_item = self.collection.get_content_class().create(self.collection, content)<EOL><DEDENT>etesync_item.save()<EOL>return self.get(href)<EOL>
Upload a new or replace an existing item.