Calling pre_process_download does not work

Bug #1713367 reported by Martin on 2017-08-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Duplicity Version 0.7.06 on Linux

In function sync_archive of duplicity at line 1185 I find the following code:

            if hasattr(globals.backend, 'pre_process_download'):
            for fn in local_missing:

Before copy_to_local, some preprocessing should be made. In case of Amazon S3 (boto) this should restore objects from Glacier. But "globals.backend" point to the backend wrapper so the condition if hasattr(globals.backend, 'pre_process_download') is never true. It must be globals.backend.backend.

When calling pre_process_download the argument is "local_missing" which is a list. But expects a single filename as the argument for pre_process_download.

I would change this to:

            if hasattr(globals.backend.backend, 'pre_process_download'):
                for fn in local_missing:
                    globals.backend.backend.pre_process_download(fn,wait=False) # restore from S3
            for fn in local_missing:

Same issue in function restore_get_patched_rop_iter.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers