Skip to content

Commit

Permalink
Remove unused exception
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit authored and lunkwill42 committed Dec 14, 2023
1 parent 878c201 commit 33381e1
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
4 changes: 0 additions & 4 deletions python/nav/portadmin/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,3 @@ class POEStateNotSupportedError(ManagementError):

class XMLParseError(ManagementError):
"""Raised when failing to parse XML"""


class POEIndexNotFoundError(ManagementError):
"""Raised when a PoE index could not be found for an interface"""
1 change: 0 additions & 1 deletion python/nav/portadmin/snmp/cisco.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
PoeState,
POEStateNotSupportedError,
POENotSupportedError,
POEIndexNotFoundError,
)
from nav.models import manage

Expand Down
2 changes: 0 additions & 2 deletions python/nav/web/portadmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
NoResponseError,
ProtocolError,
ManagementError,
POEIndexNotFoundError,
XMLParseError,
POEStateNotSupportedError,
)
Expand Down Expand Up @@ -248,7 +247,6 @@ def populate_infodict(request, netbox, interfaces):
messages.error(request, str(error))

except (
POEIndexNotFoundError,
XMLParseError,
POEStateNotSupportedError,
) as error:
Expand Down
5 changes: 1 addition & 4 deletions tests/unittests/portadmin/portadmin_poe_cisco_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
import pytest

from nav.portadmin.snmp.cisco import Cisco
from nav.portadmin.handlers import (
POEIndexNotFoundError,
POEStateNotSupportedError,
)
from nav.portadmin.handlers import POEStateNotSupportedError
from nav.models import manage


Expand Down

0 comments on commit 33381e1

Please sign in to comment.