From 717b675a57023907c3259bb6baad2c2f1cd68f8b Mon Sep 17 00:00:00 2001 From: Vikhyat Umrao Date: Fri, 30 Mar 2018 09:43:42 -0400 Subject: [PATCH] Fix ValueError: too many values to unpack issue in obo copy --replace obo copy test-bucket/test-bucket1/test1/cirros.raw test-bucket/test-bucket1/test1/cirros.raw --replace Traceback (most recent call last): File "/usr/bin/obo", line 11, in load_entry_point('obo==0.0.1', 'console_scripts', 'obo')() File "build/bdist.linux-x86_64/egg/obo/obo.py", line 969, in main File "build/bdist.linux-x86_64/egg/obo/obo.py", line 936, in copy File "build/bdist.linux-x86_64/egg/obo/obo.py", line 429, in replace ValueError: too many values to unpack Signed-off-by: Vikhyat Umrao --- obo/obo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obo/obo.py b/obo/obo.py index 71a05cc..1216c90 100644 --- a/obo/obo.py +++ b/obo/obo.py @@ -426,7 +426,7 @@ def replace(self, source, version_id): headers['x-amz-copy-source'] = src_str headers['x-amz-metadata-directive'] = 'REPLACE' - for (h, v) in k.metadata: + for (h, v) in k.metadata.items(): headers[h] = v; if k.content_type: