From 7bcda7ab932dd65fd28af274a70ebfc4eb4c09fa Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Sun, 12 May 2024 16:17:25 -0400 Subject: [PATCH] fix: get_target responds with a list --- src/gvm_sync_targets/cli/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gvm_sync_targets/cli/__init__.py b/src/gvm_sync_targets/cli/__init__.py index b13a90f..e930164 100644 --- a/src/gvm_sync_targets/cli/__init__.py +++ b/src/gvm_sync_targets/cli/__init__.py @@ -60,7 +60,7 @@ def gvm_sync_targets(username: str, password: str, hosts_file: TextIO) -> None: ) # Ensure old target is unused - old_target: "ElementBase" = gmp.get_target(old_target_id) + old_target: "ElementBase" = gmp.get_target(old_target_id)[0] old_name = old_target.xpath("name/text()[1]") if old_target.xpath("sum(in_use/text()) > 0"): msg = "target is still in use"