Skip to content

Commit

Permalink
Remove unused context manager object
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Nov 15, 2024
1 parent 82fe0ad commit d79c121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/nav/web/seeddb/page/netbox/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def check_snmp_version(ip, profile):
def test_napalm_connectivity(ip_address: str, profile: ManagementProfile) -> dict:
"""Tests connectivity of a NAPALM profile and returns a status dictionary"""
try:
with napalm.connect(ip_address, profile) as device: # noqa
with napalm.connect(ip_address, profile):
return {"status": True}
except Exception as error:
_logger.exception("Could not connect to %s using NAPALM profile", ip_address)
Expand Down

0 comments on commit d79c121

Please sign in to comment.