Skip to content

Commit

Permalink
Also ignore 404 errors during delete for conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
telotortium committed Mar 15, 2023
1 parent 3e5e438 commit 966d711
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vdirsyncer/storage/dav.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,8 @@ async def update(self, href, item, etag):
rv = await self._put(self._normalize_href(href), item, None)
except aiohttp.ClientResponseError as delerr:
dav_logger.debug(f"delerr.status = {delerr.status}")
if delerr.status == 404:
dav_logger("Old event not found, ignoring")
if delerr.status == 403 or delerr.status == 404:
dav_logger.warning("Old event not found, ignoring")
rv = None, None
else:
raise
Expand All @@ -629,8 +629,8 @@ async def upload(self, item: Item):
rv = await self._put(href, item, None)
except aiohttp.ClientResponseError as delerr:
dav_logger.debug(f"delerr.status = {delerr.status}")
if delerr.status == 404:
dav_logger.debug("Old event not found, ignoring")
if delerr.status == 403 or delerr.status == 404:
dav_logger.warning("Old event not found, ignoring")
rv = None, None
else:
raise
Expand Down

0 comments on commit 966d711

Please sign in to comment.