diff options
-rw-r--r-- | caldav/davclient.py | 6 | ||||
-rw-r--r-- | caldav/lib/vcal.py | 4 | ||||
-rw-r--r-- | caldav/objects.py | 14 |
3 files changed, 12 insertions, 12 deletions
diff --git a/caldav/davclient.py b/caldav/davclient.py index 5c9f6fc..5498ba6 100644 --- a/caldav/davclient.py +++ b/caldav/davclient.py @@ -38,7 +38,7 @@ class DAVResponse: log.debug("response status: " + str(self.status)) self._raw = response.content - + ## TODO: this if/else/elif could possibly be refactored, or we should ## consider to do streaming into the xmltree library as originally ## intended. It only makes sense for really huge payloads though. @@ -186,7 +186,7 @@ class DAVResponse: if 'Schedule-Tag' in self.headers: self.schedule_tag = self.headers['Schedule-Tag'] - + responses = self._strip_to_multistatus() for r in responses: if r.tag == dav.SyncToken.tag: @@ -494,7 +494,7 @@ class DAVClient: Send a delete request. """ return self.request(url, "DELETE") - + def options(self, url): return self.request(url, "OPTIONS") diff --git a/caldav/lib/vcal.py b/caldav/lib/vcal.py index 792c1fb..1517397 100644 --- a/caldav/lib/vcal.py +++ b/caldav/lib/vcal.py @@ -23,10 +23,10 @@ import uuid ## generating broken data. Compatibility issues should also be collected ## in the documentation. somewhere. def fix(event): - """This function receives some ical as it's given from the server, checks for + """This function receives some ical as it's given from the server, checks for breakages with the standard, and attempts to fix up known issues: - 1) COMPLETED MUST be a datetime in UTC according to the RFC, but sometimes + 1) COMPLETED MUST be a datetime in UTC according to the RFC, but sometimes a date is given. (Google Calendar?) 2) The RFC does not specify any range restrictions on the dates, diff --git a/caldav/objects.py b/caldav/objects.py index 38346b3..e76b1c8 100644 --- a/caldav/objects.py +++ b/caldav/objects.py @@ -121,7 +121,7 @@ class DAVObject(object): self.url.join(path).strip_trailing_slash()): c.append((self.url.join(path), resource_types, resource_name)) - + ## TODO: return objects rather than just URLs, and include ## the properties we've already fetched return c @@ -175,7 +175,7 @@ class DAVObject(object): return foo.get(prop.tag, None) def get_properties(self, props=None, depth=0, parse_response_xml=True, parse_props=True): - """Get properties (PROPFIND) for this object. + """Get properties (PROPFIND) for this object. With parse_response_xml and parse_props set to True a best-attempt will be done on decoding the XML we get from the @@ -185,7 +185,7 @@ class DAVObject(object): to decode. With parse_props set to false but parse_response_xml set to true, xml elements will be returned rather than values. - + Parameters: * props = [dav.ResourceType(), dav.DisplayName(), ...] @@ -202,7 +202,7 @@ class DAVObject(object): properties = response.find_objects_and_props() else: properties = response.expand_simple_props(props) - + error.assert_(properties) path = unquote(self.url.path) @@ -1049,7 +1049,7 @@ class Calendar(DAVObject): vcalendar = cdav.CompFilter("VCALENDAR") + vevent filter = cdav.Filter() + vcalendar root = cdav.CalendarQuery() + [prop, filter] - + return self.search(root, comp_class=Event) def objects_by_sync_token(self, sync_token=None, load_objects=False): @@ -1452,7 +1452,7 @@ class CalendarObjectResource(DAVObject): attendee = self.client.principal() cnt=0 - + if isinstance(attendee, Principal): for addr in attendee.calendar_user_address_set(): try: @@ -1629,7 +1629,7 @@ class CalendarObjectResource(DAVObject): class Event(CalendarObjectResource): """ - The `Event` object is used to represent an event (VEVENT). + The `Event` object is used to represent an event (VEVENT). As of 2020-12 it adds nothing to the inheritated class. (I have frequently asked myself if we need those subclasses ... perhaps |