From eef269507f3cebe5ed79b2a92881f1ec39e13747 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Fri, 2 Jan 2015 22:30:43 +0100 Subject: [PATCH] Only catch HTTPErrors Connection timeouts should not be interpreted as missing server support. --- vdirsyncer/storage/dav.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index fca8d69..b7d23b4 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -13,7 +13,7 @@ import itertools from lxml import etree from requests import session as requests_session -from requests.exceptions import RequestException +from requests.exceptions import HTTPError from .base import Item, Storage from .http import USERAGENT, prepare_auth, prepare_verify @@ -76,7 +76,7 @@ def _catch_generator_exceptions(f): try: for x in f(*args, **kwargs): yield x - except (RequestException, exceptions.Error): + except (HTTPError, exceptions.Error): pass return inner