(self)
| 312 | self.thread.start() |
| 313 | |
| 314 | def stop(self): |
| 315 | self.running = False |
| 316 | if not self.thread: |
| 317 | return |
| 318 | self.thread.join(timeout=0.5) |
| 319 | self.thread = None |
| 320 | # Clear the spinner line from the calling thread after the animator |
| 321 | # has exited; clearing from the animator raced with output printed |
| 322 | # right after stop() and could blank part of it (erased lines in |
| 323 | # large output, e.g. ksm config tokens) with the padding spaces. |
| 324 | clear_len = max(self._last_visible_len, len(self.message or '') + 2) |
| 325 | sys.stderr.write('\r' + ' ' * clear_len + '\r') |
| 326 | sys.stderr.flush() |
| 327 | self._last_visible_len = 0 |
| 328 | |
| 329 | |
| 330 | def post_login_summary(record_count=0, breachwatch_count=0, show_tips=True): |
no outgoing calls