auto-t: add simple getter for radios

This commit is contained in:
James Prestwood 2019-06-11 09:25:53 -07:00 committed by Denis Kenzior
parent 38bb528c71
commit 0c554500e1
1 changed files with 8 additions and 0 deletions

View File

@ -299,3 +299,11 @@ class Hwsim(iwd.AsyncOpAbstract):
iface.SendFrame(bytearray.fromhex(station.replace(':', '')),
freq, -30, bytearray.fromhex(frame))
def get_radio(self, name):
for path in self.radios:
radio = self.radios[path]
if radio.name == name:
return radio
return None