Check ETag before modifying or adding items.

This commit is contained in:
Guillaume Ayoub
2010-04-12 14:43:40 +02:00
parent 71b928d58b
commit f479b4ba67
3 changed files with 31 additions and 17 deletions

View File

@ -174,6 +174,12 @@ class Calendar(object):
return items
def get_item(self, name):
"""Get calendar item called ``name``."""
for item in self.items:
if item.name == name:
return item
def append(self, name, text):
"""Append items from ``text`` to calendar.