Skip to content

Conversation

@belm0
Copy link

@belm0 belm0 commented May 15, 2022

  • --reconnect option will silently retry (on the initially connected port)
  • only show received/send backtrace if --develop
  • exit with code 1 when there is an error

Fixes #558

$ python -m serial.tools.miniterm /dev/foo --reconnect
--- Miniterm on /dev/cu.wchusbserial51850172701  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
fps:  65.4,  render:  1.0 ms
fps:  64.9,  render:  1.0 ms
fps:  64.7,  render:  1.0 ms

--- disconnected ---
fps:  64.5,  render:  1.0 ms
fps:  64.5,  render:  1.0 ms
fps:  64.5,  render:  1.0 ms

--- exit ---

  * --reconnect option will silently retry (on the initially
    connected port)

  * exit with code 1 when there is an error

Fixes pyserial#558
self.console.cancel()
raise # XXX handle instead of re-raise?
if not self.quiet:
sys.stderr.write('--- receive exception ---\n')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be "--- received exception ---\n"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconnect after connection loss

3 participants