From 260d5f585a78358706662b3acaafa66b1921f2c2 Mon Sep 17 00:00:00 2001 From: lethliel Date: Wed, 22 May 2019 12:57:02 +0200 Subject: [PATCH] fix outupt of status on attribute deletion On osc meta attribute --attribue --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 05faaac1..8c220021 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.')