Add back the .tag members to Items and Calendars
authorKeith Packard <keithp@keithp.com>
Wed, 21 Dec 2011 00:21:29 +0000 (16:21 -0800)
committerKeith Packard <keithp@keithp.com>
Wed, 21 Dec 2011 00:21:29 +0000 (16:21 -0800)
The ones in Items are used to tell which object type to return from proplist

Signed-off-by: Keith Packard <keithp@keithp.com>
calypso/ical.py

index a521d25f643cc838112043bde40d161015bd271b..892f04c7e6a78df9eb033c0323badbf07d9cc75f 100644 (file)
@@ -99,6 +99,9 @@ class Item(object):
             self.object.add("X-CALYPSO-NAME").value = name
 
         self.name = self.object.x_calypso_name.value
+
+        # VCALENDAR or VCARD
+        self.tag = self.object.name
             
         try:
             self.etag = hashlib.sha1(self.object.serialize()).hexdigest()
@@ -184,6 +187,7 @@ class Calendar(object):
         self.my_items = []
         self.mtime = 0
         self.scan_dir()
+        self.tag = "Collection"
 
     def has_git(self):
         return os.path.exists(os.path.join(self.path, ".git"))