mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
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>
17 lines
525 B
Python
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()
|