From 27a666daab1b6a283d916d0ca59b5335b6c4f8f6 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Thu, 10 Feb 2022 02:28:43 +0800 Subject: [PATCH] Fix: Safely delete minitouch_builder --- module/device/method/minitouch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/device/method/minitouch.py b/module/device/method/minitouch.py index 34761a24f..914e017e7 100644 --- a/module/device/method/minitouch.py +++ b/module/device/method/minitouch.py @@ -183,7 +183,7 @@ def retry(func): def init(): self.adb_connect(self.serial) - del self.__dict__['minitouch_builder'] + del_cached_property(self, 'minitouch_builder') # MinitouchError: Received empty data from minitouch except MinitouchError as e: logger.error(e) @@ -192,13 +192,13 @@ def retry(func): self.install_uiautomator2() if self._minitouch_port: self.adb_forward_remove(f'tcp:{self._minitouch_port}') - del self.__dict__['minitouch_builder'] + del_cached_property(self, 'minitouch_builder') # AdbError except AdbError as e: if handle_adb_error(e): def init(): self.adb_connect(self.serial) - del self.__dict__['minitouch_builder'] + del_cached_property(self, 'minitouch_builder') else: break # Unknown, probably a trucked image