fix(testdata): bat python 查找链对齐 启动造价审核.bat(venv 优先,绿包已移出致断链);面板端口被占时直接开浏览器不再崩
This commit is contained in:
8
release/testdata/panel_server.py
vendored
8
release/testdata/panel_server.py
vendored
@@ -383,7 +383,13 @@ linkedChange();loadStats();poll();
|
||||
|
||||
|
||||
def main():
|
||||
srv = ThreadingHTTPServer(("127.0.0.1", PORT), H)
|
||||
try:
|
||||
srv = ThreadingHTTPServer(("127.0.0.1", PORT), H)
|
||||
except OSError:
|
||||
# 端口被占(多半已有一个面板在跑)→ 不崩,直接开浏览器指过去
|
||||
log("端口 %d 已被占用,可能已有面板在跑,直接打开浏览器。" % PORT)
|
||||
webbrowser.open("http://127.0.0.1:%d" % PORT)
|
||||
return
|
||||
log("testdata 控制台:http://127.0.0.1:%d" % PORT)
|
||||
threading.Timer(0.6, lambda: webbrowser.open("http://127.0.0.1:%d" % PORT)).start()
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user