Skip to content

Commit 48b4aa2

Browse files
committed
give more time for slow repair
1 parent 6b2bdd5 commit 48b4aa2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/utils/updater_wrapper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
logger = logging.getLogger(__name__)
2626

2727

28-
def _find_window(process: psutil.Process):
29-
for i in range(0, 30):
28+
def _find_window(process: psutil.Process, timeout: int = 30):
29+
for i in range(0, timeout):
3030
windows = findwindows.find_elements(title_re="DCS Updater *", top_level_only=False)
3131
window = next((window for window in windows if len(window.children()) > 6), None)
3232
if window:
@@ -88,7 +88,7 @@ def uia_wrapper_from_handle(handle):
8888
repair_btn.invoke()
8989

9090
# close the OK message
91-
window = _find_window(process)
91+
window = _find_window(process, timeout=1800 if slow else 180)
9292
dlg = app.window(handle=window.handle)
9393
dlg.wait('ready', timeout=15)
9494
ok_btn = uia_wrapper_from_handle(dlg.children()[0].handle)

0 commit comments

Comments
 (0)