diff mbox series

[auh,V3,04/11] modules/utils/git.py: include repo_dir in exception and unneeded debug

Message ID 20260312035211.745546-4-Qi.Chen@windriver.com
State New
Headers show
Series [auh,V3,01/11] upgrade-helper.py: remove unused self.poky_git settings | expand

Commit Message

Chen, Qi March 12, 2026, 3:52 a.m. UTC
From: Chen Qi <Qi.Chen@windriver.com>

Including the repo_dir in exception helps people know where the git
command is actually executed.

There's no need for the debug output here, because all the information
has already been in the exception.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 modules/utils/git.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/modules/utils/git.py b/modules/utils/git.py
index 3be75bf..9a71a3c 100644
--- a/modules/utils/git.py
+++ b/modules/utils/git.py
@@ -24,7 +24,6 @@ 
 #
 
 import os
-from logging import debug as D
 
 from utils.bitbake import bb
 from errors import Error
@@ -41,8 +40,7 @@  class Git(object):
         try:
             stdout, stderr = bb.process.run(cmd)
         except bb.process.ExecutionError as e:
-            D("%s executed from %s returned:\n%s" % (cmd, self.repo_dir, e.__str__()))
-            raise Error("The following git command failed: " + operation,
+            raise Error("The following git command failed in %s: %s" % (self.repo_dir, operation),
                         e.stdout, e.stderr)
 
         return stdout