dpbx: doesn't work with par2 backend

Bug #1586934 reported by Dmitry Nezhevenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

As far as I understand, it should be possible to add/remove par2 wrapper at any time. For dpbx backend it doesn't work because par2 expects certain kind of exception for 'file not found' error:

dpbx,files_download(/test/duplicity-full-signatures.20160530T073719Z.sigtar.gz.par2)
Exception [('ac9210f954bd7235a5e59e88a05b9624', DownloadError(u'path', LookupError(u'not_found', None)))]:
| Traceback (most recent call last):
| File "/home/dion/dev/duplicity/duplicity/backends/dpbxbackend.py", line 76, in wrapper
| return f(self, *args)
| File "/home/dion/dev/duplicity/duplicity/backends/dpbxbackend.py", line 301, in _get
| res_metadata, http_fd = self.api_client.files_download(remote_path)
| File "/home/dion/dev/dropbox-sdk-python/dropbox/base.py", line 139, in files_download
| None,
| File "/home/dion/dev/dropbox-sdk-python/dropbox/dropbox.py", line 244, in request
| user_message_locale)
| ApiError: ('ac9210f954bd7235a5e59e88a05b9624', DownloadError(u'path', LookupError(u'not_found', None)))
dpbx code error "('ac9210f954bd7235a5e59e88a05b9624', DownloadError(u'path', LookupError(u'not_found', None)))"
Deleting tree /tmp/duplicity-Cv8NXL-tempdir/duplicity_temp.1
Selecting /tmp/duplicity-Cv8NXL-tempdir/duplicity_temp.1
Deleting /tmp/duplicity-Cv8NXL-tempdir/duplicity_temp.1
Backtrace of previous error: Traceback (innermost last):
  File "/home/dion/dev/duplicity/duplicity/backend.py", line 365, in inner_retry
    return fn(self, *args)
  File "/home/dion/dev/duplicity/duplicity/backend.py", line 541, in get
    self.backend._get(remote_filename, local_path)
  File "/home/dion/dev/duplicity/duplicity/backends/par2backend.py", line 114, in get
    self.wrapped_backend._get(par2file.get_filename(), par2file)
  File "/home/dion/dev/duplicity/duplicity/backends/dpbxbackend.py", line 76, in wrapper
    return f(self, *args)
  File "/home/dion/dev/duplicity/duplicity/backends/dpbxbackend.py", line 301, in _get
    res_metadata, http_fd = self.api_client.files_download(remote_path)
  File "/home/dion/dev/dropbox-sdk-python/dropbox/base.py", line 139, in files_download
    None,
  File "/home/dion/dev/dropbox-sdk-python/dropbox/dropbox.py", line 244, in request
    user_message_locale)
 ApiError: ('ac9210f954bd7235a5e59e88a05b9624', DownloadError(u'path', LookupError(u'not_found', None)))

I'm not sure, whether par2 expectation is correct or not. In any case followed patch fixes par2+dpbx backend so it's now possible to add/remove par2 at any time

Tags: dpbx patch
Revision history for this message
Dmitry Nezhevenko (dmitry.nezhevenko) wrote :
Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.08
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.