mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: Throw head away in log callback
to allow background asynchronous output from the target application
This commit is contained in:
parent
59263237ab
commit
3074ff37c6
@ -39,11 +39,7 @@ class FGOpy(HeadlessCliApplication):
|
||||
return
|
||||
head, datetime, level, module, content = match.groups()
|
||||
getattr(logger, level.lower())(content)
|
||||
|
||||
if head:
|
||||
self.success = True
|
||||
self.last_error = ""
|
||||
return
|
||||
|
||||
if level == "CRITICAL":
|
||||
self.last_error = content
|
||||
return
|
||||
@ -53,6 +49,8 @@ class FGOpy(HeadlessCliApplication):
|
||||
|
||||
def run(self, cmd):
|
||||
self.mutex.acquire()
|
||||
self.success = True
|
||||
self.last_error = ""
|
||||
self.feed(cmd)
|
||||
with self.mutex:
|
||||
pass
|
||||
|
||||
Loading…
Reference in New Issue
Block a user