mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
kvmd-otgconf: Ignore some errors
This commit is contained in:
@@ -103,12 +103,18 @@ class _GadgetControl:
|
||||
def enable_functions(self, funcs: list[str]) -> None:
|
||||
with self.__udc_stopped():
|
||||
for func in funcs:
|
||||
try:
|
||||
os.symlink(self.__get_fsrc_path(func), self.__get_fdest_path(func))
|
||||
except FileExistsError:
|
||||
pass
|
||||
|
||||
def disable_functions(self, funcs: list[str]) -> None:
|
||||
with self.__udc_stopped():
|
||||
for func in funcs:
|
||||
try:
|
||||
os.unlink(self.__get_fdest_path(func))
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
def list_functions(self) -> None:
|
||||
metas = list(self.__read_metas())
|
||||
|
||||
Reference in New Issue
Block a user