mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 01:51:53 +08:00
@@ -22,7 +22,7 @@
|
||||
|
||||
import os
|
||||
|
||||
from .languages import Languages
|
||||
from .lanuages import Lanuages
|
||||
|
||||
from . import env
|
||||
|
||||
@@ -33,10 +33,10 @@ def find_udc(udc: str) -> str:
|
||||
candidates = sorted(os.listdir(path))
|
||||
if not udc:
|
||||
if len(candidates) == 0:
|
||||
raise RuntimeError(Languages().gettext("Can't find any UDC"))
|
||||
raise RuntimeError(Lanuages().gettext("Can't find any UDC"))
|
||||
udc = candidates[0]
|
||||
elif udc not in candidates:
|
||||
raise RuntimeError(Languages().gettext(f"Can't find selected UDC: {udc}"))
|
||||
raise RuntimeError(Lanuages().gettext(f"Can't find selected UDC: {udc}"))
|
||||
return udc # fe980000.usb
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user