Blob Blame History Raw
From 5349bc9d1105c71158fce8dfd6a4733eb90dbb1a Mon Sep 17 00:00:00 2001
From: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Date: Mon, 30 Mar 2020 19:36:26 +0530
Subject: [PATCH] Fix targetclid daemon infinite stuck

We need to open a byte IO stream because we are actually dealing with
binary data in memory.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
---
 daemon/targetclid | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemon/targetclid b/daemon/targetclid
index dfc22ce..d4c6562 100755
--- a/daemon/targetclid
+++ b/daemon/targetclid
@@ -154,7 +154,7 @@ class TargetCLI:
                 connection.close()
                 still_listen = False
             else:
-                self.con._stdout = self.con._stderr = f = io.StringIO()
+                self.con._stdout = self.con._stderr = f = io.BytesIO()
                 try:
                     # extract multiple commands delimited with '%'
                     list_data = data.decode().split('%')
-- 
2.21.0