@@ -545,13 +545,16 @@ def _cleanup_old_buckets(raw_api, auth_dict, bucket_list_dict):
545545 bucket_name = bucket_dict ['bucketName' ]
546546 if _should_delete_bucket (bucket_name ):
547547 print ('cleaning up old bucket: ' + bucket_name )
548- _clean_and_delete_bucket (
549- raw_api ,
550- auth_dict ['apiUrl' ],
551- auth_dict ['authorizationToken' ],
552- auth_dict ['accountId' ],
553- bucket_id ,
554- )
548+ try :
549+ _clean_and_delete_bucket (
550+ raw_api ,
551+ auth_dict ['apiUrl' ],
552+ auth_dict ['authorizationToken' ],
553+ auth_dict ['accountId' ],
554+ bucket_id ,
555+ )
556+ except Exception as exc :
557+ print ('Could not delete bucket ' + bucket_name + ' because ' + str (exc ))
555558
556559
557560def _clean_and_delete_bucket (raw_api , api_url , account_auth_token , account_id , bucket_id ):
@@ -587,7 +590,7 @@ def _clean_and_delete_bucket(raw_api, api_url, account_auth_token, account_id, b
587590def _should_delete_bucket (bucket_name ):
588591 # Bucket names for this test look like: c7b22d0b0ad7-1460060364-5670
589592 # Other buckets should not be deleted.
590- if bucket_name .startswith ('clitst' ):
593+ if bucket_name .startswith ('clitst' ) or bucket_name . startswith ( 'sdktst' ) :
591594 return True
592595
593596 match = re .match (r'^test-raw-api-[a-f0-9]+-([0-9]+)-([0-9]+)' , bucket_name )
0 commit comments