mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Opt: abspath in appdir of uiautomator2 cache
This commit is contained in:
parent
7ff3e98f5f
commit
2f0382c46d
@ -60,7 +60,7 @@ def patch_uiautomator2():
|
||||
So we patch `uiautomator2/init.py` to a local assets cache `uiautomator2cache/cache`.
|
||||
appdir = os.path.join(os.path.expanduser('~'), '.uiautomator2')
|
||||
to:
|
||||
appdir = os.path.join(__file__, '../../uiautomator2cache')
|
||||
appdir = os.path.abspath(os.path.join(__file__, '../../uiautomator2cache'))
|
||||
|
||||
And we also remove minicap installations since emulators doesn't need it.
|
||||
for url in self.minicap_urls:
|
||||
@ -71,7 +71,7 @@ def patch_uiautomator2():
|
||||
"""
|
||||
cache_dir = './toolkit/Lib/site-packages/uiautomator2cache/cache'
|
||||
init_file = './toolkit/Lib/site-packages/uiautomator2/init.py'
|
||||
appdir = "os.path.join(__file__, '../../uiautomator2cache')"
|
||||
appdir = "os.path.abspath(os.path.join(__file__, '../../uiautomator2cache'))"
|
||||
|
||||
if not os.path.exists(init_file):
|
||||
logger.info('uiautomator2 is not installed skip patching')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user