Change exception to warning

This commit is contained in:
Markus Unterwaditzer 2014-09-12 16:52:46 +02:00
parent 9dbb359569
commit 1c1aadedc0

View file

@ -335,8 +335,12 @@ class DavStorage(Storage):
try: try:
hrefs_left.remove(href) hrefs_left.remove(href)
except KeyError: except KeyError:
raise KeyError('{} doesn\'t exist in {}' if href in hrefs:
.format(href, hrefs_left)) dav_logger.warning('Server sent item twice: {}'
.format(href))
else:
dav_logger.warning('Server sent unsolicited item: {}'
.format(href))
for href in hrefs_left: for href in hrefs_left:
raise exceptions.NotFoundError(href) raise exceptions.NotFoundError(href)
return rv return rv