Skip to content

Commit

Permalink
remove uneeded case
Browse files Browse the repository at this point in the history
  • Loading branch information
tmacro committed Nov 29, 2023
1 parent 61d97ec commit 12893b2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/reindex/s3_bucketd.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

ACCOUNT_UPDATE_CHUNKSIZE = 100

from pprint import pprint

def get_options():
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--sentinel-ip", default='127.0.0.1', help="Sentinel IP")
Expand Down Expand Up @@ -235,6 +237,7 @@ def _sum_objects(self, bucket, listing):
total_size = 0
last_key = None
for status_code, payload in listing:
pprint(payload)
contents = payload['Versions'] if isinstance(payload, dict) else payload
if contents is None:
_log.error('Invalid contents in listing. bucket:%s status_code:%s'%(bucket.name, status_code))
Expand Down Expand Up @@ -265,12 +268,12 @@ def _sum_objects(self, bucket, listing):
def count_bucket_contents(self, bucket):

def get_key_marker(p):
if p is None or len(p) == 0:
if p is None:
return ''
return p.get('NextKeyMarker', '')

def get_vid_marker(p):
if p is None or len(p) == 0:
if p is None:
return ''
return p.get('NextVersionIdMarker', '')

Expand Down

0 comments on commit 12893b2

Please sign in to comment.