New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fail fast on exceptions #121

Closed
slavkoja opened this Issue Sep 26, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@slavkoja

slavkoja commented Sep 26, 2014

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

@untitaker

This comment has been minimized.

Member

untitaker commented Sep 26, 2014

This is intended behavior, i found it useful when debugging. It doesn't make sense from a user perspective though, a --fail-fast flag might make sense.

@untitaker untitaker added the cat: ui label Sep 26, 2014

@slavkoja

This comment has been minimized.

slavkoja commented Sep 26, 2014

Ah, OK. But perhaps you can consider some as --debug option for this, because it can confuse users as it confused me ;-)

@untitaker untitaker changed the title from Unhandled exception occured while syncing to Don't fail fast on exceptions Sep 26, 2014

@untitaker untitaker closed this in 2d62c87 Oct 8, 2014

@untitaker

This comment has been minimized.

Member

untitaker commented Oct 8, 2014

This is fixed, see the referenced commit message for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment