Skip to content

Commit

Permalink
Merge pull request #3029 from Uninett/cleanup/remove-unused-variables
Browse files Browse the repository at this point in the history
Remove unused variables
  • Loading branch information
johannaengland authored Nov 22, 2024
2 parents 4ebeb71 + b77f3e8 commit 6f508a6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 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
3 changes: 2 additions & 1 deletion python/nav/ipdevpoll/plugins/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def on_plugin_load(cls):
@defer.inlineCallbacks
def handle(self):
self._logger.debug("Collecting physical entity data")
need_to_collect = yield self._need_to_collect()
# Temporarily disabled due to consistency issues with some vendors:
# need_to_collect = yield self._need_to_collect()
# if need_to_collect:
if True:
physical_table = yield self.entitymib.get_entity_physical_table()
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 6f508a6

Please sign in to comment.