From 260d5f585a78358706662b3acaafa66b1921f2c2 Mon Sep 17 00:00:00 2001
From: lethliel <mstrigl@suse.com>
Date: Wed, 22 May 2019 12:57:02 +0200
Subject: [PATCH 1/9] fix outupt of status on attribute deletion
On osc meta attribute --attribue <name> --delete the returned
data is encoded. Therefore the sys.stdout.write(data) call fails.
Solution: Decode data
--> sys.stdout.write(decode_it(data))
---
osc/commandline.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/osc/commandline.py b/osc/commandline.py
index 05faaac..8c22002 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
@@ -1102,7 +1102,7 @@ class Osc(cmdln.Cmdln):
attributepath.append(opts.attribute)
u = makeurl(apiurl, attributepath)
for data in streamfile(u, http_DELETE):
- sys.stdout.write(data)
+ sys.stdout.write(decode_it(data))
else:
raise oscerr.WrongOptions('The --delete switch is only for pattern metadata or attributes.')
--
2.21.0