[PATCH 1/2] repos: Drop redundant error logging

4 views
Skip to first unread message

Jan Kiszka

unread,
Jan 30, 2026, 2:35:31 AM (11 days ago) Jan 30
to kas-devel
From: Jan Kiszka <jan.k...@siemens.com>

The raised RepoFetchError will already report about the failed fetch.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
kas/repos.py | 2 --
1 file changed, 2 deletions(-)

diff --git a/kas/repos.py b/kas/repos.py
index c2f1c42..5d0dd78 100644
--- a/kas/repos.py
+++ b/kas/repos.py
@@ -467,8 +467,6 @@ class RepoImpl(Repo):
cwd=self.path,
fail=False)
if retc:
- logging.error('Could not update repository %s: %s',
- self.name, output)
raise RepoFetchError(self, output)
else:
logging.info('Repository %s updated', self.name)
--
2.51.0

Jan Kiszka

unread,
Jan 30, 2026, 2:36:16 AM (11 days ago) Jan 30
to kas-devel, Jörg Sommer
From: Jan Kiszka <jan.k...@siemens.com>

If fetching fails, stderr is what we want to report, not the empty
stdout.

Reported-by: Jörg Sommer <joerg....@navimatix.de>
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
kas/repos.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kas/repos.py b/kas/repos.py
index 5d0dd78..ed1122d 100644
--- a/kas/repos.py
+++ b/kas/repos.py
@@ -463,11 +463,11 @@ class RepoImpl(Repo):

# Try to fetch if commit/tag/branch/refspec is missing or if --update
# argument was passed
- (retc, output) = await run_cmd_async(self.fetch_cmd(),
+ (retc, _, err) = await run_cmd_async(self.fetch_cmd(),
cwd=self.path,
- fail=False)
+ fail=False, capture_stderr=True)
if retc:
- raise RepoFetchError(self, output)
+ raise RepoFetchError(self, err)

MOESSBAUER, Felix

unread,
Jan 30, 2026, 8:28:52 AM (10 days ago) Jan 30
to Kiszka, Jan, kas-...@googlegroups.com, joerg....@navimatix.de
On Fri, 2026-01-30 at 08:36 +0100, 'Jan Kiszka' via kas-devel wrote:
> From: Jan Kiszka <jan.k...@siemens.com>
>
> If fetching fails, stderr is what we want to report, not the empty
> stdout.

This makes sense. Both patches:

Reviewed-by: Felix Moessbauer <felix.mo...@siemens.com>

Felix

>
> Reported-by: Jörg Sommer <joerg....@navimatix.de>
> Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
> ---
> kas/repos.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kas/repos.py b/kas/repos.py
> index 5d0dd78..ed1122d 100644
> --- a/kas/repos.py
> +++ b/kas/repos.py
> @@ -463,11 +463,11 @@ class RepoImpl(Repo):
>
> # Try to fetch if commit/tag/branch/refspec is missing or if --update
> # argument was passed
> - (retc, output) = await run_cmd_async(self.fetch_cmd(),
> + (retc, _, err) = await run_cmd_async(self.fetch_cmd(),
> cwd=self.path,
> - fail=False)
> + fail=False, capture_stderr=True)
> if retc:
> - raise RepoFetchError(self, output)
> + raise RepoFetchError(self, err)
> else:
> logging.info('Repository %s updated', self.name)
>
> --
> 2.51.0
>
> --
> You received this message because you are subscribed to the Google Groups "kas-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kas-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/kas-devel/e5041848-6a3f-4f90-9e8f-4d055de7c0ab%40siemens.com.

--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany

Reply all
Reply to author
Forward
0 new messages