[Bugfix] Reject negative --device-ids indices instead of selecting the wrong device (#49053)
Signed-off-by: Vineeth Sai <vineethsai4444@gmail.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
co-authored by
Harry Mellor
parent
458ba2edf8
commit
194da61de1
@@ -2113,7 +2113,7 @@ class EngineArgs:
|
||||
for x in cvd.split(",")
|
||||
]
|
||||
for i in int_ids:
|
||||
if i >= len(cvd_ids):
|
||||
if not 0 <= i < len(cvd_ids):
|
||||
raise ValueError(
|
||||
f"--device-ids index {i} is out of range for "
|
||||
f"{current_platform.device_control_env_var}"
|
||||
|
||||
Reference in New Issue
Block a user