Skip to content

Commit 0e0fe62

Browse files
committed
another workaround for exotic server implementations
1 parent 689075c commit 0e0fe62

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

caldav/calendarobjectresource.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,14 @@ def load_by_multiget(self) -> Self:
621621
"""
622622
error.assert_(self.url)
623623
mydata = self.parent._multiget(event_urls=[self.url], raise_notfound=True)
624-
url, self.data = next(mydata)
624+
try:
625+
url, self.data = next(mydata)
626+
except StopIteration:
627+
## We shouldn't come here. Something is wrong.
628+
## TODO: research it
629+
## As of 2025-05-20, this code section is used by
630+
## TestForServerECloud::testCreateOverwriteDeleteEvent
631+
raise error.NotFoundError(self.url)
625632
assert_(self.data)
626633
assert_(next(mydata, None) is None)
627634
return self

0 commit comments

Comments
 (0)