Fix copy.py example.

Change-Id: Id2a58a085f58b0bf17eda636593bb482d614c245
This commit is contained in:
PAPAMICA 2022-01-12 09:57:05 +01:00 committed by Mickael Asseline
parent 3f5d5b0252
commit 4989d94663
1 changed files with 3 additions and 3 deletions

View File

@ -9,17 +9,17 @@ logger = logging.getLogger(__name__)
with SwiftService() as swift:
try:
obj = SwiftCopyObject("c", {"Destination": "/cont/d"})
obj = SwiftCopyObject("c", {"destination": "/cont/d"})
for i in swift.copy(
"cont", ["a", "b", obj],
{"meta": ["foo:bar"], "Destination": "/cc"}):
{"meta": ["foo:bar"], "destination": "/cc"}):
if i["success"]:
if i["action"] == "copy_object":
print(
"object %s copied from /%s/%s" %
(i["destination"], i["container"], i["object"])
)
if i["action"] == "create_container":
elif i["action"] == "create_container":
print(
"container %s created" % i["container"]
)