mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-28 16:15:24 +02:00
App: Support --verbose
Add the --verbose global option, which is made available as the App.verbose property. Some functions still take a verbose parameter, but the type of these parameters is converted from bool to bool|None. The idea is that, if they are None, their verbosity falls back to the global default. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
525fa34387
commit
67a2931f5e
5 changed files with 28 additions and 11 deletions
|
|
@ -82,7 +82,9 @@ class Distro(abc.ABC):
|
|||
async def _reboot_required(self, verbose: bool) -> bool:
|
||||
pass
|
||||
|
||||
async def reboot_required(self, verbose: bool=False) -> bool:
|
||||
async def reboot_required(self, verbose: bool|None=None) -> bool:
|
||||
if verbose is None:
|
||||
verbose = self.ctx.verbose_default
|
||||
return await self._reboot_required(verbose=verbose)
|
||||
|
||||
# -- select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue