From 60a882c0e29945639590ea662f18e52cefbf0feb Mon Sep 17 00:00:00 2001 From: John Dickinson Date: Tue, 8 Mar 2011 10:50:07 -0600 Subject: [PATCH] better handling of internal_proxy.get_container_list response in log_processor --- swift/stats/log_processor.py | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/swift/stats/log_processor.py b/swift/stats/log_processor.py index 1152550381..492709302e 100644 --- a/swift/stats/log_processor.py +++ b/swift/stats/log_processor.py @@ -141,22 +141,18 @@ class LogProcessor(object): # one to the hour should be all-inclusive. hour = '%02d' % (parsed_date.tm_hour + 1) end_key = '/'.join([year, month, day, hour]) - try: - container_listing = self.internal_proxy.get_container_list( - swift_account, - container_name, - marker=search_key, - end_marker=end_key) - except Exception: - self.logger.exception(_('error getting a listing of the container')) + container_listing = self.internal_proxy.get_container_list( + swift_account, + container_name, + marker=search_key, + end_marker=end_key) results = [] - if container_listing is not None: - if listing_filter is None: - listing_filter = set() - for item in container_listing: - name = item['name'] - if name not in listing_filter: - results.append(name) + if listing_filter is None: + listing_filter = set() + for item in container_listing: + name = item['name'] + if name not in listing_filter: + results.append(name) return results def get_object_data(self, swift_account, container_name, object_name,