Skip to content

Commit

Permalink
inserted a warning for servers not supporing current-user-principal
Browse files Browse the repository at this point in the history
  • Loading branch information
tobixen committed Jun 4, 2024
1 parent f4d5cd2 commit 28716eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion caldav/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,10 @@ def __init__(
cup = self.get_property(dav.CurrentUserPrincipal())

if cup is None:
raise ValueError("Unexpected value None for cup")
log.warning("calendar server lacking a feature:")
log.warning("current-user-principal property not found")
log.warning("assuming %s is the principal URL" %
self.client.url)

self.url = self.client.url.join(URL.objectify(cup))

Expand Down

0 comments on commit 28716eb

Please sign in to comment.