Skip to content

Commit

Permalink
fix: get_target responds with a list
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdaemon committed May 12, 2024
1 parent 62455b8 commit 7bcda7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gvm_sync_targets/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7bcda7a

Please sign in to comment.