tidy up things :return:
(self)
| 358 | ) |
| 359 | |
| 360 | def end(self): |
| 361 | """ |
| 362 | tidy up things |
| 363 | :return: |
| 364 | """ |
| 365 | # keep the chat_id session for future reference |
| 366 | # so we don't need to send a message each time InstaPy restart to the bot |
| 367 | # and we can keep on getting messages when the sessions finishes |
| 368 | |
| 369 | # send one last message to the user reporting the session |
| 370 | if (self.__chat_id is not None) and (self.__context is not None): |
| 371 | self.__context.bot.send_message( |
| 372 | chat_id=self.__chat_id, text=self._live_report() |
| 373 | ) |
| 374 | self.__updater.stop() |
| 375 | self.token = "" |
| 376 | self.telegram_username = "" |
| 377 | self.instapy_session = None |
| 378 | self.__chat_id = None |
| 379 | self.__context = None |
nothing calls this directly
no test coverage detected