From 3f38ac3827e5b289d479ada5f0cb9d28f740dd7b Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Mon, 6 Jul 2026 00:47:00 +0800 Subject: [PATCH] fix: add more fool-proof serial input redirection --- module/device/connection_attr.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/device/connection_attr.py b/module/device/connection_attr.py index 8fddeff..278c267 100644 --- a/module/device/connection_attr.py +++ b/module/device/connection_attr.py @@ -69,6 +69,10 @@ class ConnectionAttr: res = re.search(r'(127\.\d+\.\d+\.\d+:\d+)', serial) if res: serial = res.group(1) + # 12127.0.0.1:16384 + serial = serial.replace('12127.0.0.1', '127.0.0.1') + # auto127.0.0.1:16384 + serial = serial.replace('auto127.0.0.1', '127.0.0.1').replace('autoemulator', 'emulator') return str(serial) def serial_check(self):