Lines Matching refs:self
37 def __init__(self, device):
38 self._device = device
39 self.log = device.log
40 self.proc = None
41 self.thread = None
42 self.local_port = None
43 self.is_server_started = False
45 def __del__(self):
46 self.terminate()
230 def terminate(self):
231 if self.local_port is not None and isinstance(self.local_port, int):
232 if hasattr(self._device, "is_oh") or \
233 self._device.usb_type == DeviceConnectorType.hdc:
234 self._device.connector_command('fport rm tcp:{}'.format(self.local_port))
236 self._device.connector_command('forward --remove tcp:{}'.format(self.local_port))
237 if self.proc is not None:
238 stop_standing_subprocess(self.proc)
239 if self.thread is not None:
242 while self.thread.isAlive() and time.time() - start < 3: