Prefer to use safer self.is_connected() as it checks interface is not None. Using common code gives small observable changes in behaviour: - slightly different print_error() messages - network restarts now enter status 'connecting' which they didn't before, which seems correct - status 'connecting' is done with set_status() rather than simply assigning the status, which seems more correct. Now that the response_queue is available in the constructor this works; it used to fail with 'response_queue is not defined'
19 KiB
19 KiB