From f255ece30529b1b14a7f51e1f543d406d3afcc0e Mon Sep 17 00:00:00 2001 From: David-Sarah Hopwood Date: Thu, 14 Feb 2013 22:29:17 +0000 Subject: [PATCH] openstack_container.py: fix a bug in type of ContainerListing.is_truncated. Signed-off-by: David-Sarah Hopwood --- src/allmydata/storage/backends/cloud/cloud_common.py | 1 + .../storage/backends/cloud/openstack/openstack_container.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- 2.45.2