From: David-Sarah Hopwood Date: Thu, 14 Feb 2013 22:29:17 +0000 (+0000) Subject: openstack_container.py: fix a bug in type of ContainerListing.is_truncated. X-Git-Url: https://git.rkrishnan.org/somewhere?a=commitdiff_plain;h=3a76e63690ef8f1d1401ecf85d546cd2e9d0501e;p=tahoe-lafs%2Ftahoe-lafs.git openstack_container.py: fix a bug in type of ContainerListing.is_truncated. Signed-off-by: David-Sarah Hopwood --- diff --git a/src/allmydata/storage/backends/cloud/cloud_common.py b/src/allmydata/storage/backends/cloud/cloud_common.py index a1338ebb..00004c28 100644 --- a/src/allmydata/storage/backends/cloud/cloud_common.py +++ b/src/allmydata/storage/backends/cloud/cloud_common.py @@ -302,6 +302,7 @@ class ContainerItem(object): class ContainerListing(object): def __init__(self, name, prefix, marker, max_keys, is_truncated, contents=None, common_prefixes=None): + precondition(isinstance(is_truncated, str)) self.name = name self.prefix = prefix self.marker = marker diff --git a/src/allmydata/storage/backends/cloud/openstack/openstack_container.py b/src/allmydata/storage/backends/cloud/openstack/openstack_container.py index 5474effe..4dbcf8a7 100644 --- a/src/allmydata/storage/backends/cloud/openstack/openstack_container.py +++ b/src/allmydata/storage/backends/cloud/openstack/openstack_container.py @@ -262,7 +262,7 @@ class OpenStackContainer(ContainerRetryMixin): return ContainerItem(key, modification_date, etag, size, storage_class) contents = map(_make_containeritem, items) - return ContainerListing(self._container_name, prefix, None, 10000, False, contents=contents) + return ContainerListing(self._container_name, prefix, None, 10000, "false", contents=contents) d.addCallback(_parse_list) return d