mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 09:39:25 +01:00
test-runner: handle pyroute2 IW() between versions
It appears different versions of pyroute2 may or may not have iwutil, and instead use pyroute2.IW() directly. Try the iwutil way first, then pyroute2.IW()
This commit is contained in:
parent
4d66e11b0c
commit
89407089cd
@ -853,7 +853,11 @@ class TestContext(Namespace):
|
||||
|
||||
def discover_radios(self):
|
||||
phys = []
|
||||
|
||||
try:
|
||||
iw = pyroute2.iwutil.IW()
|
||||
except:
|
||||
iw = pyroute2.IW()
|
||||
|
||||
attrs = [phy['attrs'] for phy in iw.list_wiphy()]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user