jw-pkg/src/python/jw/pkg/cmds/distro/CmdRebootRequired.py
Jan Lindemann 67a2931f5e 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>
2026-03-06 19:02:22 +01:00

17 lines
525 B
Python

# -*- coding: utf-8 -*-
from argparse import Namespace, ArgumentParser
from .Cmd import Cmd
from ..CmdDistro import CmdDistro
class CmdRebootRequired(Cmd): # export
def __init__(self, parent: CmdDistro) -> None:
super().__init__(parent, 'reboot-required', help="Check whether the machine needs rebooting")
def add_arguments(self, parser: ArgumentParser) -> None:
super().add_arguments(parser)
async def _run(self, args: Namespace) -> None:
return await self.distro.reboot_required()