We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99d5954 commit d970379Copy full SHA for d970379
src/local/butler/scripts/migrate_blobs.py
@@ -93,10 +93,13 @@ def migrate_bucket(source_bucket, target_bucket):
93
94
assert bucket_exists
95
96
- result = common.execute(f'gcloud storage rsync --recursive gs://{source_bucket} gs://{target_bucket}')
97
- print(result)
98
-
99
- print(f'Migrated bucket contents from {source_bucket} to {target_bucket}')
+ error_code, output = common.execute(f'gcloud storage rsync --recursive gs://{source_bucket} gs://{target_bucket}', exit_on_error=False)
+ output_as_str = str(output)
+ print(output_as_str)
+ if error_code == 0:
100
+ print(f'Migrated bucket contents from {source_bucket} to {target_bucket}')
101
+ else:
102
+ print(f'Failed to migrate bucket: {output_as_str}')
103
104
def migrate_data_bundle(data_bundle):
105
'''
0 commit comments