File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -93,10 +93,13 @@ def migrate_bucket(source_bucket, target_bucket):
93
93
94
94
assert bucket_exists
95
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 } ' )
96
+ error_code , output = common .execute (f'gcloud storage rsync --recursive gs://{ source_bucket } gs://{ target_bucket } ' , exit_on_error = False )
97
+ output_as_str = str (output )
98
+ print (output_as_str )
99
+ 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 } ' )
100
103
101
104
def migrate_data_bundle (data_bundle ):
102
105
'''
You can’t perform that action at this time.
0 commit comments