Fix copy.py example.
Change-Id: Id2a58a085f58b0bf17eda636593bb482d614c245
This commit is contained in:
parent
3f5d5b0252
commit
4989d94663
@ -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"]
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user