With the exception of the "info" subcommand, nearly all of distro's subcommands deal with package managing, so push them into their own command category.
Signed-off-by: Jan Lindemann <jan@janware.com>
17 lines
516 B
Python
17 lines
516 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from argparse import Namespace, ArgumentParser
|
|
|
|
from .Cmd import Cmd
|
|
from ..CmdPkg import CmdPkg
|
|
|
|
class CmdRebootRequired(Cmd): # export
|
|
|
|
def __init__(self, parent: CmdPkg) -> 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()
|