mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-21 06:45:34 +08:00
Fix: Avoid using global proxies when installing u2
This commit is contained in:
@@ -44,6 +44,12 @@ class AdbManager(DeployConfig):
|
|||||||
if module in message:
|
if module in message:
|
||||||
show_fix_tip(module)
|
show_fix_tip(module)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
# Remove global proxies, or uiautomator2 will go through it
|
||||||
|
for k in list(os.environ.keys()):
|
||||||
|
if k.lower().endswith('_proxy'):
|
||||||
|
del os.environ[k]
|
||||||
|
|
||||||
from uiautomator2.init import Initer
|
from uiautomator2.init import Initer
|
||||||
for device in adbutils.adb.iter_device():
|
for device in adbutils.adb.iter_device():
|
||||||
init = Initer(device, loglevel=logging.DEBUG)
|
init = Initer(device, loglevel=logging.DEBUG)
|
||||||
|
|||||||
Reference in New Issue
Block a user