Skip to content

When not provided with no argument, it should report an error and usage example #7

@zoobab

Description

@zoobab

When not provided with no argument, it should report an error and usage example.

Right now, it throws an error saying it cannot find "/dev/tty.usbserial-ftCYPMYJ":

$ ./stm32loader.py 
Traceback (most recent call last):
  File "./stm32loader.py", line 427, in <module>
    cmd.open(conf['port'], conf['baud'])
  File "./stm32loader.py", line 71, in open
    timeout=5               # set a timeout value, None for waiting forever
  File "/usr/lib64/python2.7/site-packages/serial/serialutil.py", line 236, in __init__
    self.open()
  File "/usr/lib64/python2.7/site-packages/serial/serialposix.py", line 268, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/tty.usbserial-ftCYPMYJ: [Errno 2] No such file or directory: '/dev/tty.usbserial-ftCYPMYJ'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions