From db689f0d8163b3706ac4fdb68725c99323e774c8 Mon Sep 17 00:00:00 2001 From: ut001652 Date: Mon, 23 Sep 2024 15:20:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9find=5Fimage=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E8=BF=9C=E7=A8=8B=E8=B0=83=E7=94=A8=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=A4=9A=E5=8F=82=E6=95=B0=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E9=83=A8=E7=BD=B2=E6=97=B6=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E4=B8=AD=E5=BF=83=E7=99=BD=E5=90=8D=E5=8D=95?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/remotectl/remote.py | 8 +++++--- src/utils/env_vir.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/remotectl/remote.py b/src/remotectl/remote.py index 7dac969a..e7f5368b 100644 --- a/src/remotectl/remote.py +++ b/src/remotectl/remote.py @@ -94,9 +94,11 @@ def rctl_plus(self) -> Src: restart_service=self.restart_service, ) - def find_image(self, image_path): - _image_path = image_path.replace(conf.HOME, "~", 1) - return self.rctl_plus.find_image(_image_path) + def find_image(self, image_path, rate=None, multiple=False, picture_abspath=None, screen_bbox=None, + log_level='info', network_retry=None, pause=None, timeout=None, max_match_number=None): + _image_path = tuple([_path.replace(conf.HOME, "~", 1) for _path in image_path]) + return self.rctl_plus.find_image_remote(_image_path, rate, multiple, picture_abspath, screen_bbox, log_level, + network_retry, pause, timeout, max_match_number) if __name__ == '__main__': diff --git a/src/utils/env_vir.sh b/src/utils/env_vir.sh index be21dcf5..cb8852cd 100644 --- a/src/utils/env_vir.sh +++ b/src/utils/env_vir.sh @@ -81,7 +81,7 @@ if [ $? != 0 ]; then exit 121 fi python_virtualenv_path=$(pipenv --venv) -whitelist_path=`echo "${python_virtualenv_path}" | sed "s/\/home\/$USER\//\//"` +whitelist_path=`echo "${python_virtualenv_path}" | sed "s/$HOME\//\//"` if [ -f "${whitelist}" ]; then result=`sudo cat ${whitelist} | grep ${whitelist_path}` if [ -z "$result" ]; then