We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d97114 commit 042b7e1Copy full SHA for 042b7e1
s3cmd
@@ -2481,10 +2481,15 @@ def cmd_settagging(args):
2481
uri = S3Uri(args[0])
2482
tag_set_string = args[1]
2483
2484
- tagsets = [
2485
- tuple(tagset.split("="))
2486
- for tagset in tag_set_string.split("&")
2487
- ]
+ tagsets = []
+ for tagset in tag_set_string.split("&"):
+ keyval = tagset.split("=", 1)
+ key = keyval[0]
2488
+ if not key:
2489
+ raise ParameterError("Tag key should not be empty")
2490
+ value = len(keyval) > 1 and keyval[1] or ""
2491
+ tagsets.append((key, value))
2492
+
2493
debug(tagsets)
2494
response = s3.set_tagging(uri, tagsets)
2495
0 commit comments