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