mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: [ALAS] Patch u2.init.appdir in runtime
This commit is contained in:
parent
3179cdc81d
commit
6818a9d86c
@ -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