mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-05 17:30:30 +00:00
perf: 修复 Chrome 执行脚本失败,页面卡在进度条界面的问题
This commit is contained in:
@@ -7,6 +7,7 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
from subprocess import CREATE_NO_WINDOW
|
||||
from threading import Thread
|
||||
|
||||
_blockInput = None
|
||||
_messageBox = None
|
||||
@@ -36,7 +37,10 @@ def unblock_input():
|
||||
|
||||
def notify_err_message(msg):
|
||||
if _messageBox:
|
||||
_messageBox(msg, 'Error')
|
||||
# _messageBox 是阻塞当前线程的,所以需要开启一个新线程执行
|
||||
t = Thread(target=_messageBox, args=(msg, 'Error'), kwargs={})
|
||||
t.daemon = True
|
||||
t.start()
|
||||
|
||||
|
||||
def decode_content(content: bytes) -> str:
|
||||
|
Reference in New Issue
Block a user