diff options
Diffstat (limited to 'kvmd/apps/cleanup')
-rw-r--r-- | kvmd/apps/cleanup/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kvmd/apps/cleanup/__init__.py b/kvmd/apps/cleanup/__init__.py index b39559f6..39bd7a71 100644 --- a/kvmd/apps/cleanup/__init__.py +++ b/kvmd/apps/cleanup/__init__.py @@ -24,6 +24,9 @@ import os import subprocess import time +from typing import List +from typing import Optional + from ...logging import get_logger from ... import gpio @@ -32,8 +35,8 @@ from .. import init # ===== -def main() -> None: - config = init("kvmd-cleanup", description="Kill KVMD and clear resources")[2].kvmd +def main(argv: Optional[List[str]]=None) -> None: + config = init("kvmd-cleanup", description="Kill KVMD and clear resources", argv=argv)[2].kvmd logger = get_logger(0) logger.info("Cleaning up ...") @@ -47,7 +50,7 @@ def main() -> None: ("streamer_cap_pin", config.streamer.cap_pin), ("streamer_conv_pin", config.streamer.conv_pin), ]: - if pin > 0: + if pin >= 0: logger.info("Writing value=0 to pin=%d (%s)", pin, name) gpio.set_output(pin, initial=False) |