1.1 --- a/imip_store.py Sat Mar 05 01:04:19 2016 +0100
1.2 +++ b/imip_store.py Sun Mar 06 00:11:29 2016 +0100
1.3 @@ -28,7 +28,6 @@
1.4 from imiptools.text import parse_line
1.5 from os.path import isdir, isfile, join
1.6 from os import listdir, remove, rmdir
1.7 -from time import sleep
1.8 import codecs
1.9
1.10 class FileStoreBase(FileBase):
1.11 @@ -348,6 +347,11 @@
1.12 "Remove an event for 'user' having the given 'uid'."
1.13
1.14 self.remove_recurrences(user, uid)
1.15 + return self.remove_parent_event(user, uid)
1.16 +
1.17 + def remove_parent_event(self, user, uid):
1.18 +
1.19 + "Remove the parent event for 'user' having the given 'uid'."
1.20
1.21 filename = self.get_object_in_store(user, "objects", uid)
1.22 if not filename:
1.23 @@ -451,6 +455,15 @@
1.24 for recurrenceid in self.get_recurrences(user, uid):
1.25 self.remove_recurrence(user, uid, recurrenceid)
1.26
1.27 + return self.remove_recurrence_collection(user, uid)
1.28 +
1.29 + def remove_recurrence_collection(self, user, uid):
1.30 +
1.31 + """
1.32 + Remove the collection of recurrences stored by 'user' having the given
1.33 + 'uid'.
1.34 + """
1.35 +
1.36 recurrences = self.get_object_in_store(user, "recurrences", uid)
1.37 if recurrences:
1.38 return self._remove_collection(recurrences)