lib.ExecContext.CallContext.log_delim: Beautify
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m18s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m24s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m17s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m21s
CI / Packaging test (push) Successful in 0s

Make the log delimiter look more consistent: Whether a CallContext was constructed with a title parameter or without, prefix its .log_delimiter property with a "----".

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-10 13:17:19 +02:00
commit 238cc05d3b
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -119,12 +119,9 @@ class ExecContext(Base):
self.__wd = wd self.__wd = wd
self.__log_prefix = log_prefix self.__log_prefix = log_prefix
self.__parent = parent self.__parent = parent
self.__title = title
self.__pretty_cmd: str | None = None self.__pretty_cmd: str | None = None
self.__delim = ( self.__title = f'{parent.uri}: Running {self.pretty_cmd} -'
title if title is not None else self.__delim = f'---- {title} -'
f'---- {parent.uri}: Running {self.pretty_cmd} -'
)
delim_len = 120 delim_len = 120
self.__delim += '-' * max(0, delim_len - len(self.__delim)) self.__delim += '-' * max(0, delim_len - len(self.__delim))
self.__mod_env = {'LC_ALL': 'C'} if mod_env is None else mod_env self.__mod_env = {'LC_ALL': 'C'} if mod_env is None else mod_env