Bug 124: https://github.com/s3tools/s3cmd/issues/124
s3cmd sync --dry-run --recursive BLAH/ s3://blah-blah-blah
would traceback:
File "/usr/local/bin/s3cmd", line 1075, in _child
output(u"remote copy: %s -> %s" % (dst1['object_key'],
remote_list[dst2]['object_key']))
TypeError: string indices must be integers
In this case, dst1 and dst2, coming from copy_pairs, are themselves
the strings we want, not a lookup into a list. So use them directly.
... | ... |
@@ -1080,7 +1080,7 @@ def cmd_sync_local2remote(args): |
1080 | 1080 |
for key in update_list: |
1081 | 1081 |
output(u"upload: %s -> %s" % (update_list[key]['full_name_unicode'], update_list[key]['remote_uri'])) |
1082 | 1082 |
for (src_obj, dst1, dst2) in copy_pairs: |
1083 |
- output(u"remote copy: %s -> %s" % (dst1['object_key'], remote_list[dst2]['object_key'])) |
|
1083 |
+ output(u"remote copy: %s -> %s" % (dst1, dst2)) |
|
1084 | 1084 |
if cfg.delete_removed: |
1085 | 1085 |
for key in remote_list: |
1086 | 1086 |
output(u"delete: %s" % remote_list[key]['object_uri_str']) |