lib.ec.secret_store.Base.put(): Log no-op put()
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m8s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m10s
CI / Packaging test (pull_request) Successful in 0s

A put() that leaves the stored content unchanged is silently skipped. Add
debug logging to make the decision more obvious.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-10-30 13:54:53 +01:00
commit 69dd51e93c
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -5,6 +5,7 @@ from typing import TYPE_CHECKING, Awaitable, Callable, TypeVar, override
from ...base import Result, StatResult
from ...file_types import FT_DIR, FT_REG
from ...FileContext import FileContext
from ...log import DEBUG, log
from .layout import DEFAULT_PREFIX, host_prefix
if TYPE_CHECKING:
@ -153,6 +154,10 @@ class Base(FileContext):
pass
else:
if self._put_is_noop(existing.stdout, content, ftype):
log(
DEBUG,
f'{self.log_name}: put: "{path}" unchanged, not written',
)
return Result()
return await super().put(
path,