tests: remote: Allow passing of parameters with devname
Allow parameters to be passed together with the device name. For example, -m mon1:1,20,1,0 Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
This commit is contained in:
parent
777afa9f07
commit
8456b9e7db
1 changed files with 2 additions and 0 deletions
|
@ -69,6 +69,8 @@ def get_devices(filename="cfg.py"):
|
||||||
def get_device(devices, name=None, flags=None, lock=False):
|
def get_device(devices, name=None, flags=None, lock=False):
|
||||||
if name is None and flags is None:
|
if name is None and flags is None:
|
||||||
raise Exception("Failed to get device")
|
raise Exception("Failed to get device")
|
||||||
|
word = name.split(":")
|
||||||
|
name = word[0]
|
||||||
for device in devices:
|
for device in devices:
|
||||||
if device['name'] == name:
|
if device['name'] == name:
|
||||||
return device
|
return device
|
||||||
|
|
Loading…
Reference in a new issue