mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: [ALAS] Patch u2.init.appdir in runtime
This commit is contained in:
parent
30d4ffc644
commit
4cff3e6283
@ -1,3 +1,4 @@
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import socket
|
||||
@ -5,6 +6,7 @@ import time
|
||||
import typing as t
|
||||
|
||||
import uiautomator2 as u2
|
||||
import uiautomator2cache
|
||||
from adbutils import AdbTimeout
|
||||
from lxml import etree
|
||||
|
||||
@ -51,6 +53,9 @@ from module.logger import logger
|
||||
RETRY_TRIES = 5
|
||||
RETRY_DELAY = 3
|
||||
|
||||
# Patch uiautomator2 appdir
|
||||
u2.init.appdir = os.path.dirname(uiautomator2cache.__file__)
|
||||
|
||||
|
||||
def is_port_using(port_num):
|
||||
""" if port is using by others, return True. else return False """
|
||||
|
||||
Loading…
Reference in New Issue
Block a user