diff --git a/efb_wechat_slave/__init__.py b/efb_wechat_slave/__init__.py index 45e1c17..7d65499 100644 --- a/efb_wechat_slave/__init__.py +++ b/efb_wechat_slave/__init__.py @@ -257,6 +257,9 @@ def master_qr_code(self, uuid, status, qrcode=None): coordinator.send_message(msg) def exit_callback(self): + # Don't send prompt if there's nowhere to send. + if not coordinator.master: + return self.logger.debug('Calling exit callback...') if self._stop_polling_event.is_set(): return