Skip to content

Don't fail fast on exceptions #121

@slavkoja

Description

@slavkoja

I got this unhandled exception today:

Unhandled exception occured while syncing skola.ics.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/cli.py", line 393, in sync_collection
    force_delete=status_name in force_delete
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/sync.py", line 129, in sync
    b_idents = _prepare_idents(storage_b, b_href_to_status)
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/sync.py", line 66, in _prepare_idents
    for href, etag in storage.list():
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/storage/dav.py", line 552, in list
    for href, etag in self._dav_query(xml):
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/storage/dav.py", line 413, in _dav_query
    headers=headers
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/storage/dav.py", line 189, in request
    self._check_dav_header()
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/storage/dav.py", line 201, in _check_dav_header
    headers=headers
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/storage/dav.py", line 191, in request
    session=self._session, **self._settings)
  File "/usr/lib/python2.7/dist-packages/vdirsyncer/utils/__init__.py", line 243, in request
    r = func(method, url, data=data, headers=headers, auth=auth, verify=verify)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 456, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 559, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 375, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='x.y.z', port=443): Max retries exceeded with url: /user/skola.ics/ (Caused by ProtocolError('Connection aborted.', gaierror(-2, 'Name or service not known')))
Job 'vdirsyncer --verbosity WARNING sync' terminated (exit status: 1) (mailing output)

I don't know what happened, because i cannot reproduce it now, but despite it, IMO this exception need to be handled and synchronization must continue with other items, nod end here.

The "skola.ics" is a singlefile type.

regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions