diff mbox series

[v3,2/5] patman: Avoid circular dependency between command and tools

Message ID 20200522022904.239301-2-sjg@chromium.org
State Accepted
Commit ddd65b01561d6941f78363751d9713bc4cbb0cd1
Headers show
Series [v3,1/5] patman: Drop unnecessary import in gitutil | expand

Commit Message

Simon Glass May 22, 2020, 2:29 a.m. UTC
This seems to cause problems in some cases. Split the dependency by
copying the code to command.

Reported-by: Stefan Bosch <stefan_b at posteo.net>
Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3: None
Changes in v2: None

 tools/patman/command.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/patman/command.py b/tools/patman/command.py
index e67ac159e5a..bf8ea6c8c3c 100644
--- a/tools/patman/command.py
+++ b/tools/patman/command.py
@@ -5,7 +5,6 @@ 
 import os
 
 from patman import cros_subprocess
-from patman import tools
 
 """Shell command ease-ups for Python."""
 
@@ -35,9 +34,9 @@  class CommandResult:
 
     def ToOutput(self, binary):
         if not binary:
-            self.stdout = tools.ToString(self.stdout)
-            self.stderr = tools.ToString(self.stderr)
-            self.combined = tools.ToString(self.combined)
+            self.stdout = self.stdout.decode('utf-8')
+            self.stderr = self.stderr.decode('utf-8')
+            self.combined = self.combined.decode('utf-8')
         return self