imip-agent

Changeset

858:5c9f875443c5
2015-10-17 Paul Boddie raw files shortlog changelog graph Expose other sections via store access methods.
imip_store.py (file) imiptools/client.py (file)
     1.1 --- a/imip_store.py	Sat Oct 17 00:31:05 2015 +0200
     1.2 +++ b/imip_store.py	Sat Oct 17 01:01:44 2015 +0200
     1.3 @@ -249,7 +249,7 @@
     1.4          else:
     1.5              return self.get_complete_event_filename(user, uid, dirname, username)
     1.6  
     1.7 -    def get_event(self, user, uid, recurrenceid=None):
     1.8 +    def get_event(self, user, uid, recurrenceid=None, dirname=None):
     1.9  
    1.10          """
    1.11          Get the event for the given 'user' with the given 'uid'. If
    1.12 @@ -257,7 +257,7 @@
    1.13          occurrence of an event is returned.
    1.14          """
    1.15  
    1.16 -        filename = self.get_event_filename(user, uid, recurrenceid)
    1.17 +        filename = self.get_event_filename(user, uid, recurrenceid, dirname)
    1.18          if not filename or not isfile(filename):
    1.19              return None
    1.20  
     2.1 --- a/imiptools/client.py	Sat Oct 17 00:31:05 2015 +0200
     2.2 +++ b/imiptools/client.py	Sat Oct 17 01:01:44 2015 +0200
     2.3 @@ -250,7 +250,7 @@
     2.4          if section == "counters":
     2.5              fragment = self.store.get_counter(self.user, username, uid, recurrenceid)
     2.6          else:
     2.7 -            fragment = self.store.get_event(self.user, uid, recurrenceid)
     2.8 +            fragment = self.store.get_event(self.user, uid, recurrenceid, section)
     2.9          return fragment and Object(fragment)
    2.10  
    2.11      # Free/busy operations.