commit 89407089cd3f7de330a2dd049591e174376736fb
parent 4d66e11b0ce054f51c5d48835786488e82bbf4af
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 28 Oct 2021 10:34:09 -0700
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()
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/test-runner b/tools/test-runner
@@ -853,7 +853,11 @@ class TestContext(Namespace):
def discover_radios(self):
phys = []
- iw = pyroute2.iwutil.IW()
+
+ try:
+ iw = pyroute2.iwutil.IW()
+ except:
+ iw = pyroute2.IW()
attrs = [phy['attrs'] for phy in iw.list_wiphy()]