mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 12:08:21 +08:00
code format
I promised to finish the development of AlasFpyBridge before 6.4 and now I have done it!
This commit is contained in:
@@ -10,11 +10,13 @@ from submodule.AlasFpyBridge.module.utils.headlessCliApplication import Headless
|
||||
|
||||
|
||||
class FGOpy(HeadlessCliApplication):
|
||||
def __init__(self, path, counter={}): # Caution that a mutable object is used for default paprameter
|
||||
def __init__(self, path, counter={}):
|
||||
# Caution that a mutable object is used for default paprameter
|
||||
assert os.path.isabs(path) and os.path.exists(path)
|
||||
launch = shutil.which("launch", path=path)
|
||||
assert launch
|
||||
halt = shutil.which("halt", path=path) # If you filled in `/usr/sbin` as the path, and there happened to be an executable named `launch`, and Alas had root privileges...
|
||||
# If you filled in `/usr/sbin` as the path, and there happened to be an executable named `launch`, and Alas had root privileges...
|
||||
halt = shutil.which("halt", path=path)
|
||||
os.environ["PATH"] = os.pathsep.join([
|
||||
os.path.abspath(os.path.dirname(DeployConfig().AdbExecutable)),
|
||||
os.environ["PATH"],
|
||||
@@ -34,7 +36,7 @@ class FGOpy(HeadlessCliApplication):
|
||||
)
|
||||
super().__init__(launch)
|
||||
while self.first_log:
|
||||
time.sleep(.5)
|
||||
time.sleep(0.5)
|
||||
self.start_orphan_slayer(self.info["PID"], halt)
|
||||
|
||||
def callback(self, line):
|
||||
|
||||
@@ -13,7 +13,7 @@ class FgoConfig(AzurLaneConfig, ConfigUpdater, GeneratedConfig):
|
||||
FpyMain
|
||||
> FpyDailyFpSummon
|
||||
> FpyHeartbeat
|
||||
"""
|
||||
"""
|
||||
|
||||
# @override
|
||||
def __init__(self, config_name, task=None):
|
||||
|
||||
@@ -9,10 +9,7 @@ class HeadlessCliApplication:
|
||||
"""Wrap a cli application to provide programmable interactive access"""
|
||||
|
||||
def __init__(self, launch):
|
||||
self.pipe = Popen(
|
||||
[launch],
|
||||
stdin=PIPE, stdout=PIPE, stderr=STDOUT, text=True
|
||||
)
|
||||
self.pipe = Popen([launch], stdin=PIPE, stdout=PIPE, stderr=STDOUT, text=True)
|
||||
|
||||
def f():
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user