[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] Small but important patch for Amazon S3 support
From: |
Kenneth Loafman |
Subject: |
Re: [Duplicity-talk] Small but important patch for Amazon S3 support |
Date: |
Sun, 23 Sep 2007 10:30:12 -0500 |
User-agent: |
Thunderbird 1.5.0.13 (X11/20070824) |
Mitchell Garnaat wrote:
> Hi -
>
> I've begun using Duplicity for some of my backups. It's great! I'm
> using the Amazon S3 backend exclusively but I found a small problem in
> the list method. The current version is calling the "get_all_keys"
> method of the S3 bucket object to iterate over all of the key ( e.g.
> objects/files) stored in the S3 bucket. The problem is, this method
> will return only the first 1000 keys in the bucket. To get the
> subsequent keys you need to keep calling S3 until it tells you it is out
> of results. Fortunately, boto already provides a simple way to do
> this; just treat the bucket itself as a sequence object and iterate
> over the keys. Boto will handle all of the paging of results from S3.
>
> This is a one-line change in backends.py:
>
> 697c697
> < filename_list = [k.key for k in self.bucket]
> ---
>> filename_list = [k.key for k in self.bucket.get_all_keys()]
Thanks! This will go in ASAP.
...Ken
signature.asc
Description: OpenPGP digital signature