Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typing in puppet target #442

Merged
merged 1 commit into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions grizzly/target/puppet_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from signal import SIGABRT, Signals
from tempfile import TemporaryDirectory, mkdtemp
from time import sleep, time
from typing import Dict, Optional, Set, cast
from typing import Any, Dict, Optional, Set, cast

try:
from signal import SIGUSR1 # pylint: disable=ungrouped-imports
Expand All @@ -24,6 +24,8 @@
from prefpicker import PrefPicker
from psutil import AccessDenied, NoSuchProcess, Process, process_iter, wait_procs

from sapphire import CertificateBundle

from ..common.report import Report
from ..common.utils import grz_tmp
from .target import Result, Target, TargetLaunchError, TargetLaunchTimeout
Expand Down Expand Up @@ -100,9 +102,9 @@ def __init__(
launch_timeout: int,
log_limit: int,
memory_limit: int,
**kwds,
**kwds: Dict[str, Any],
) -> None:
certs = kwds.pop("certs", None)
certs = cast(Optional[CertificateBundle], kwds.pop("certs", None))
# only pass certs to FFPuppet if certutil is available
# otherwise certs can't be used
if certs and not certutil_available(certutil_find(binary)):
Expand Down Expand Up @@ -133,7 +135,7 @@ def __init__(
# create Puppet object
self._puppet = FFPuppet(
debugger=self._debugger,
headless=kwds.pop("headless", None),
headless=cast(Optional[str], kwds.pop("headless", None)),
working_path=str(grz_tmp("target")),
)
if kwds:
Expand Down
Loading