summaryrefslogtreecommitdiff
path: root/kvmd/apps/otgmsd/__init__.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-07 23:54:05 +0200
committerMaxim Devaev <[email protected]>2023-03-07 23:54:05 +0200
commitf652eca9c213dd783cf2ffd02109b2353ccb86c1 (patch)
tree3c2a5c68e0b03536ec5c482b9b5be708795e8292 /kvmd/apps/otgmsd/__init__.py
parent002031baf15d328dad764a620e1c83c01e7a55a6 (diff)
refactoring
Diffstat (limited to 'kvmd/apps/otgmsd/__init__.py')
-rw-r--r--kvmd/apps/otgmsd/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/apps/otgmsd/__init__.py b/kvmd/apps/otgmsd/__init__.py
index 2540eb0b..eb894217 100644
--- a/kvmd/apps/otgmsd/__init__.py
+++ b/kvmd/apps/otgmsd/__init__.py
@@ -39,14 +39,14 @@ def _get_param_path(gadget: str, instance: int, param: str) -> str:
def _get_param(gadget: str, instance: int, param: str) -> str:
- with open(_get_param_path(gadget, instance, param)) as param_file:
- return param_file.read().strip()
+ with open(_get_param_path(gadget, instance, param)) as file:
+ return file.read().strip()
def _set_param(gadget: str, instance: int, param: str, value: str) -> None:
try:
- with open(_get_param_path(gadget, instance, param), "w") as param_file:
- param_file.write(value + "\n")
+ with open(_get_param_path(gadget, instance, param), "w") as file:
+ file.write(value + "\n")
except OSError as err:
if err.errno == errno.EBUSY:
raise SystemExit(f"Can't change {param!r} value because device is locked: {err}")