Fix: 修复使用ADB时, 疯狂弹窗口的问题

- 中止运行时仍然会弹窗, 是gooey的锅
- 修正了拼写错误
This commit is contained in:
LmeSzinc 2020-04-10 19:11:33 +08:00
parent 0c5bded2c7
commit f1c2d182db
4 changed files with 8 additions and 7 deletions

View File

@ -30,7 +30,7 @@ class Config:
# SERIAL = 'emulator-5554'
# SERIAL = '127.0.0.1:21503'
USE_ADB_SREENSHOT = False
USE_ADB_SCREENSHOT = False
az = EmulatorChecker(AzurLaneConfig().merge(Config()))

View File

@ -126,7 +126,7 @@ class AzurLaneConfig:
SERIAL = '127.0.0.1:62001'
PACKAGE_NAME = 'com.bilibili.azurlane'
COMMAND = ''
USE_ADB_SREENSHOT = False
USE_ADB_SCREENSHOT = False
USE_ADB_CONTROL = False
SCREEN_SHOT_SAVE_FOLDER_BASE = './screenshot'
SCREEN_SHOT_SAVE_FOLDER = ''

View File

@ -25,10 +25,11 @@ class Connection:
cmd = ['adb', '-s', serial] + cmd
else:
cmd = ['adb'] + cmd
# process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# result = process.stdout.read()
# print(cmd)
result = subprocess.check_output(cmd, timeout=4, stderr=subprocess.STDOUT)
# Use shell=True to disable console window when using GUI.
# Although, there's still a window when you stop running in GUI, which cause by gooey.
# To disable it, edit gooey/gui/util/taskkill.py
result = subprocess.check_output(cmd, timeout=4, stderr=subprocess.STDOUT, shell=True)
return result
def adb_shell(self, cmd, serial=None):

View File

@ -52,7 +52,7 @@ class Screenshot(Connection):
Returns:
PIL.Image.Image:
"""
adb = self.config.USE_ADB_SREENSHOT
adb = self.config.USE_ADB_SCREENSHOT
self._adb = adb
if adb: