From patchwork Wed May 20 00:53:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 246065 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Tue, 19 May 2020 18:53:02 -0600 Subject: [PATCH v2] patman: Avoid circular dependency between command and tools Message-ID: <20200520005302.45299-1-sjg@chromium.org> This seems to cause problems in some cases. Split the dependency by copying the code to command. Reported-by: Stefan Bosch Signed-off-by: Simon Glass --- Changes in v2: - Update gitutil as well tools/patman/command.py | 7 +++---- tools/patman/gitutil.py | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/patman/command.py b/tools/patman/command.py index e67ac159e5..bf8ea6c8c3 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 diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 770a051014..844f8759de 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -7,7 +7,6 @@ import os import subprocess import sys -from patman import checkpatch from patman import command from patman import series from patman import settings