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:
Jan Lindemann 2026-03-06 16:50:27 +01:00
commit 67a2931f5e
5 changed files with 28 additions and 11 deletions

View file

@ -12,7 +12,6 @@ class CmdRebootRequired(Cmd): # export
def add_arguments(self, parser: ArgumentParser) -> None:
super().add_arguments(parser)
parser.add_argument('--verbose', default=False, action='store_true', help='Be chatty about the check')
async def _run(self, args: Namespace) -> None:
return await self.distro.reboot_required(verbose=args.verbose)
return await self.distro.reboot_required()