Browse code

remote_copy() doesn't need to know dst_list anymore

Matt Domsch authored on 2012/06/17 23:57:45
Showing 1 changed files
... ...
@@ -663,7 +663,7 @@ def cmd_sync_remote2remote(args):
663 663
     seq = 0
664 664
     seq = _upload(src_list, seq, src_count + update_count)
665 665
     seq = _upload(update_list, seq, src_count + update_count)
666
-    n_copied, bytes_saved = remote_copy(s3, dst_list, copy_pairs, destination_base)
666
+    n_copied, bytes_saved = remote_copy(s3, copy_pairs, destination_base)
667 667
 
668 668
     total_elapsed = time.time() - timestamp_start
669 669
     outstr = "Done. Copied %d files in %0.1f seconds, %0.2f files/s" % (seq, total_elapsed, seq/total_elapsed)
... ...
@@ -841,7 +841,7 @@ def cmd_sync_remote2local(args):
841 841
     if cfg.delete_removed and cfg.delete_after:
842 842
         _do_deletes(local_list)
843 843
 
844
-def remote_copy(s3, remote_list, copy_pairs, destination_base):
844
+def remote_copy(s3, copy_pairs, destination_base):
845 845
     saved_bytes = 0
846 846
     for (dst1, dst2) in copy_pairs:
847 847
         debug(u"Remote Copying from %s to %s" % (dst1, dst2))
... ...
@@ -1012,7 +1012,7 @@ def cmd_sync_local2remote(args):
1012 1012
 
1013 1013
     n, total_size = _upload(local_list, 0, local_count, total_size)
1014 1014
     n, total_size = _upload(update_list, n, local_count, total_size)
1015
-    n_copies, saved_bytes = remote_copy(s3, remote_list, copy_pairs, destination_base)
1015
+    n_copies, saved_bytes = remote_copy(s3, copy_pairs, destination_base)
1016 1016
     if cfg.delete_removed and cfg.delete_after:
1017 1017
         _do_deletes(s3, remote_list)
1018 1018
     total_elapsed = time.time() - timestamp_start