Merge lp:~mterry/duplicity/cloudfiles-10k into lp:duplicity/0.6

Proposed by Michael Terry
Status: Merged
Merged at revision: 781
Proposed branch: lp:~mterry/duplicity/cloudfiles-10k
Merge into: lp:duplicity/0.6
Diff against target: 18 lines (+7/-1)
1 file modified
duplicity/backends/cloudfilesbackend.py (+7/-1)
To merge this branch: bzr merge lp:~mterry/duplicity/cloudfiles-10k
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+73185@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'duplicity/backends/cloudfilesbackend.py'
2--- duplicity/backends/cloudfilesbackend.py 2011-02-12 15:11:34 +0000
3+++ duplicity/backends/cloudfilesbackend.py 2011-08-28 19:10:35 +0000
4@@ -119,7 +119,13 @@
5 for n in range(1, globals.num_retries+1):
6 log.Info("Listing '%s'" % (self.container))
7 try:
8- keys = self.container.list_objects()
9+ # Cloud Files will return a max of 10,000 objects. We have
10+ # to make multiple requests to get them all.
11+ objs = self.container.list_objects()
12+ keys = objs
13+ while len(objs) == 10000:
14+ objs = self.container.list_objects(marker=keys[-1])
15+ keys += objs
16 return keys
17 except self.resp_exc, resperr:
18 log.Warn("Listing of '%s' failed (attempt %s): CloudFiles returned: %s %s"

Subscribers

People subscribed via source and target branches

to all changes: