Avoid exception when deleting an item already deleted (fix bug #180)
This commit is contained in:
parent
547c888c63
commit
873dec1d5d
@ -159,12 +159,16 @@ class CalendarHTTPHandler(server.BaseHTTPRequestHandler):
|
|||||||
item_name = xmlutils.name_from_path(self.path)
|
item_name = xmlutils.name_from_path(self.path)
|
||||||
if item_name:
|
if item_name:
|
||||||
# Get calendar item
|
# Get calendar item
|
||||||
items = self._calendar.timezones
|
|
||||||
item = self._calendar.get_item(item_name)
|
item = self._calendar.get_item(item_name)
|
||||||
items.append(item)
|
if item:
|
||||||
answer_text = ical.serialize(
|
items = self._calendar.timezones
|
||||||
headers=self._calendar.headers, items=items)
|
items.append(item)
|
||||||
etag = item.etag
|
answer_text = ical.serialize(
|
||||||
|
headers=self._calendar.headers, items=items)
|
||||||
|
etag = item.etag
|
||||||
|
else:
|
||||||
|
self.send_response(client.GONE)
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
# Get whole calendar
|
# Get whole calendar
|
||||||
answer_text = self._calendar.text
|
answer_text = self._calendar.text
|
||||||
|
Loading…
Reference in New Issue
Block a user