utilites.py: Fix array index

This commit is contained in:
Mykola Grymalyuk
2023-06-25 09:18:43 -06:00
parent 128c922851
commit 38bea6a666
2 changed files with 3 additions and 1 deletions

View File

@@ -437,7 +437,7 @@ def clean_device_path(device_path: str):
if len(device_path_array) >= 2:
device_path_stripped = device_path_array[-2]
device_path_root_array = device_path_stripped.split(",")
if len(device_path_root_array) >= 2:
if len(device_path_root_array) > 2:
return device_path_root_array[2]
return None