Merge lp:~noizyland/duplicity/fix-progress into lp:~duplicity-team/duplicity/0.7-series

Proposed by Scott McKenzie
Status: Merged
Merged at revision: 1095
Proposed branch: lp:~noizyland/duplicity/fix-progress
Merge into: lp:~duplicity-team/duplicity/0.7-series
Diff against target: 11 lines (+1/-0)
1 file modified
duplicity/selection.py (+1/-0)
To merge this branch: bzr merge lp:~noizyland/duplicity/fix-progress
Reviewer Review Type Date Requested Status
Aaron Whitehouse Approve
Review via email: mp+260014@code.launchpad.net

Description of the change

Fixes bug 1264744.

selection.filelist_globbing_get_sfs leaves the filelist file object's position at the end of the file. When the --progress option is used the filelists need to be read twice. On the second read nothing is read from the file because file has already been read and the position is EOF.

This patch calls seek(0) on the filelist to reset the position to BOF so that subsequent read() calls will return data.

To post a comment you must log in.
lp:~noizyland/duplicity/fix-progress updated
1096. By Scott McKenzie

Perform seek(0) on filelist before read().

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Apologies for my delay in looking at this (which Kenneth has now already merged).

With this (merged) change, the test for the bug now passes, so I have separately suggested re-enabling that test:
https://code.launchpad.net/~aaron-whitehouse/duplicity/reactivate_progress_test/+merge/263732

Thanks for sorting.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'duplicity/selection.py'
2--- duplicity/selection.py 2015-03-13 12:22:29 +0000
3+++ duplicity/selection.py 2015-05-25 11:02:28 +0000
4@@ -351,6 +351,7 @@
5 # Internal. Used by ParseArgs.
6 log.Notice(_("Reading globbing filelist %s") % list_name)
7 separator = globals.null_separator and "\0" or "\n"
8+ filelist_fp.seek(0)
9 for line in filelist_fp.read().split(separator):
10 line, include = self.filelist_sanitise_line(line, inc_default)
11 if not line:

Subscribers

People subscribed via source and target branches