mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 06:18:21 +08:00
Fix: Throw head away in log callback
to allow background asynchronous output from the target application
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user