Skip to content

Commit 04bb2b6

Browse files
authored
Merge pull request #1893 from Emantor/topic/test-fixes
driver/power/poe_netgear_plus: conditional import
2 parents 325415a + cc340aa commit 04bb2b6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

labgrid/driver/power/poe_netgear_plus.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
from urllib.parse import urlparse
2323

24-
from py_netgear_plus import NetgearSwitchConnector
25-
2624
from ..exception import ExecutionError
2725

2826

@@ -61,6 +59,8 @@ def power_set(host: str, _port: int, index: int, value: bool) -> None:
6159
value: Whether the port should enable PoE output
6260
6361
"""
62+
from py_netgear_plus import NetgearSwitchConnector
63+
6464
index = int(index)
6565
netgear_port_number = index + 1
6666

@@ -94,6 +94,8 @@ def power_get(host: str, _port: int, index: int) -> bool:
9494
ExecutionError: In case the status dictionary contains unexpected PoE status values.
9595
9696
"""
97+
from py_netgear_plus import NetgearSwitchConnector
98+
9799
index = int(index)
98100
netgear_port_number = index + 1
99101

0 commit comments

Comments
 (0)