summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/apps/otg/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/apps/otg/__init__.py b/kvmd/apps/otg/__init__.py
index e9727cf3..ce731823 100644
--- a/kvmd/apps/otg/__init__.py
+++ b/kvmd/apps/otg/__init__.py
@@ -85,12 +85,12 @@ def _write_bytes(path: str, data: bytes) -> None:
def _find_udc(udc: str) -> str:
- udcs = sorted(os.listdir(f"{env.SYSFS_PREFIX}/sys/class/udc"))
+ candidates = sorted(os.listdir(f"{env.SYSFS_PREFIX}/sys/class/udc"))
if not udc:
- if len(udcs) == 0:
+ if len(candidates) == 0:
raise RuntimeError("Can't find any UDC")
- udc = udcs[0]
- elif udc not in udcs:
+ udc = candidates[0]
+ elif udc not in candidates:
raise RuntimeError(f"Can't find selected UDC: {udc}")
get_logger().info("Using UDC %s", udc)
return udc