diff --git a/airtest/core/android/adb.py b/airtest/core/android/adb.py index ebc166d7..fd74b8b1 100644 --- a/airtest/core/android/adb.py +++ b/airtest/core/android/adb.py @@ -483,7 +483,7 @@ def pull(self, remote, local): None """ local = decode_path(local) # py2 - if PY34: + if PY3: # If it is PY3.4 or above, use Path to force / convert to \ from pathlib import Path local = Path(local).as_posix() diff --git a/airtest/core/android/rotation.py b/airtest/core/android/rotation.py index 41572f08..334abeab 100644 --- a/airtest/core/android/rotation.py +++ b/airtest/core/android/rotation.py @@ -3,7 +3,7 @@ import time import threading import traceback -from airtest.utils.snippet import reg_cleanup, is_exiting, on_method_ready +from airtest.utils.snippet import reg_cleanup, is_exiting, on_method_ready, kill_proc from airtest.utils.nbsp import NonBlockingStreamReader from airtest.utils.logger import get_logger from airtest.core.android.constant import ORI_METHOD, ROTATIONWATCHER_JAR @@ -92,9 +92,7 @@ def setup_server(self): def teardown(self): self._t_kill_event.set() if self.ow_proc: - self.ow_proc.kill() - # close io.Buffer - self.ow_proc.communicate() + kill_proc(self.ow_proc) if self.nbsp: self.nbsp.kill() self.ow_callback = []