Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Nov 22, 2024
1 parent 4ebeb71 commit 4708708
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions python/nav/bin/navdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ def management_profile():
"""Outputs a line for each management profile in the database"""
header("#name:protocol:option=value|option=value...")
for profile in manage.ManagementProfile.objects.all():
configuration = [
'{}={}'.format(key, value)
for key, value in profile.configuration.items()
]
line = [
profile.name,
profile.get_protocol_display(),
Expand Down
1 change: 0 additions & 1 deletion python/nav/web/seeddb/page/management_profile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def management_profile_list(request):
management_profile()"""
info = ManagementProfileInfo()
value_list = ('name', 'description', 'get_protocol_display', 'related')
netbox_link = reverse('seeddb-netbox')
queryset = ManagementProfile.objects.annotate(related=Count('netboxes'))
filter_form = ManagementProfileFilterForm(request.GET)
return render_list(
Expand Down
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:
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 4708708

Please sign in to comment.