mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-05-22 07:16:44 +00:00
fix bug
This commit is contained in:
@@ -112,13 +112,6 @@ class CustomCommand(_PluginBase):
|
||||
last_output = None
|
||||
last_error = None
|
||||
while True:
|
||||
output = result.stdout.readline().decode("utf-8")
|
||||
if output == '' and result.poll() is not None:
|
||||
break
|
||||
if output:
|
||||
logger.info(output.strip())
|
||||
last_output = output.strip()
|
||||
|
||||
error = result.stderr.readline().decode("utf-8")
|
||||
if error == '' and result.poll() is not None:
|
||||
break
|
||||
@@ -126,6 +119,13 @@ class CustomCommand(_PluginBase):
|
||||
logger.info(error.strip())
|
||||
last_error = error.strip()
|
||||
|
||||
output = result.stdout.readline().decode("utf-8")
|
||||
if output == '' and result.poll() is not None:
|
||||
break
|
||||
if output:
|
||||
logger.info(output.strip())
|
||||
last_output = output.strip()
|
||||
|
||||
logger.info(
|
||||
f"执行命令:{command} {'成功' if result.returncode == 0 else '失败'} 返回值:{last_output if last_output else last_error}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user