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)
|
||||||
|
if item:
|
||||||
|
items = self._calendar.timezones
|
||||||
items.append(item)
|
items.append(item)
|
||||||
answer_text = ical.serialize(
|
answer_text = ical.serialize(
|
||||||
headers=self._calendar.headers, items=items)
|
headers=self._calendar.headers, items=items)
|
||||||
etag = item.etag
|
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