...
|
...
|
@@ -250,7 +250,7 @@ def cmd_bucket_delete(args):
|
250
|
250
|
except S3Error, e:
|
251
|
251
|
if e.info['Code'] == 'BucketNotEmpty' and (cfg.force or cfg.recursive):
|
252
|
252
|
warning(u"Bucket is not empty. Removing all the objects from it first. This may take some time...")
|
253
|
|
- success = subcmd_batch_del(uri.uri())
|
|
253
|
+ success = subcmd_batch_del(uri_str = uri.uri())
|
254
|
254
|
if success:
|
255
|
255
|
return _bucket_delete_one(uri)
|
256
|
256
|
else:
|
...
|
...
|
@@ -516,7 +516,7 @@ def cmd_object_del(args):
|
516
|
516
|
if not recursive:
|
517
|
517
|
subcmd_object_del_uri(uri_str)
|
518
|
518
|
else:
|
519
|
|
- subcmd_batch_del(uri_str)
|
|
519
|
+ subcmd_batch_del(uri_str = uri_str)
|
520
|
520
|
|
521
|
521
|
def subcmd_batch_del(uri_str = None, bucket = None, remote_list = None):
|
522
|
522
|
s3 = S3(cfg)
|
...
|
...
|
@@ -1287,7 +1287,7 @@ def cmd_sync_local2remote(args):
|
1287
|
1287
|
warning(u"delete: cowardly refusing to delete because no source files were found. Use --force to override.")
|
1288
|
1288
|
cfg.delete_removed = False
|
1289
|
1289
|
|
1290
|
|
- if cfg.delete_removed and not cfg.delete_after:
|
|
1290
|
+ if cfg.delete_removed and not cfg.delete_after and remote_list:
|
1291
|
1291
|
subcmd_batch_del(remote_list = remote_list)
|
1292
|
1292
|
|
1293
|
1293
|
total_size = 0
|
...
|
...
|
@@ -1303,7 +1303,7 @@ def cmd_sync_local2remote(args):
|
1303
|
1303
|
_set_remote_uri(failed_copy_files, destination_base, single_file_local)
|
1304
|
1304
|
n, total_size = _upload(failed_copy_files, n, failed_copy_count, total_size)
|
1305
|
1305
|
|
1306
|
|
- if cfg.delete_removed and cfg.delete_after:
|
|
1306
|
+ if cfg.delete_removed and cfg.delete_after and remote_list:
|
1307
|
1307
|
subcmd_batch_del(remote_list = remote_list)
|
1308
|
1308
|
total_elapsed = time.time() - timestamp_start
|
1309
|
1309
|
total_speed = total_elapsed and total_size/total_elapsed or 0.0
|