lib.ExecContext.CallContext.log_delim: Beautify
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:
parent
844a358665
commit
1c0e7ee5a9
1 changed files with 3 additions and 4 deletions
|
|
@ -115,16 +115,15 @@ class ExecContext(Base):
|
|||
throw: bool,
|
||||
verbose: bool | None,
|
||||
) -> None:
|
||||
if title is None:
|
||||
title = f'{parent.uri}: Running {self.pretty_cmd} -'
|
||||
self.__cmd = cmd
|
||||
self.__wd = wd
|
||||
self.__log_prefix = log_prefix
|
||||
self.__parent = parent
|
||||
self.__title = title
|
||||
self.__pretty_cmd: str | None = None
|
||||
self.__delim = (
|
||||
title if title is not None else
|
||||
f'---- {parent.uri}: Running {self.pretty_cmd} -'
|
||||
)
|
||||
self.__delim = f'---- {title} -'
|
||||
delim_len = 120
|
||||
self.__delim += '-' * max(0, delim_len - len(self.__delim))
|
||||
self.__mod_env = {'LC_ALL': 'C'} if mod_env is None else mod_env
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue