Skip to content

Commit

Permalink
refactor: switch to DebugConnection wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdaemon committed May 12, 2024
1 parent 7bcda7a commit fabb134
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gvm_sync_targets/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import TYPE_CHECKING, TextIO, cast

import click
from gvm.connections import UnixSocketConnection
from gvm.connections import DebugConnection, UnixSocketConnection
from gvm.protocols.gmp import Gmp
from gvm.transforms import EtreeCheckCommandTransform

Expand All @@ -28,7 +28,8 @@
@click.argument("hosts_file", type=click.File())
def gvm_sync_targets(username: str, password: str, hosts_file: TextIO) -> None:
with Gmp(
UnixSocketConnection(), transform=EtreeCheckCommandTransform()
DebugConnection(UnixSocketConnection()),
transform=EtreeCheckCommandTransform(),
) as gmp:
hosts = hosts_file.read().splitlines()
gmp.authenticate(username, password)
Expand Down

0 comments on commit fabb134

Please sign in to comment.