Skip to content

Commit

Permalink
Added check for loopback type
Browse files Browse the repository at this point in the history
* Expect boolean on `l`, `--loopback` option
  • Loading branch information
kb1lqc committed Mar 11, 2018
1 parent 9e84abf commit 1df4b66
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions faradayio_cli/faradayio_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ def checkUserInput(args):
if args.baud not in baudrate:
raise ValueError

# Check loopback True/False
# Expect a boolean
if not isinstance(args.loopback, bool):
raise TypeError


def setupSerialPort(loopback, port, baud, readtimeout, writetimeout):
"""Sets up serial port by connecting to phsyical or software port.
Expand Down

0 comments on commit 1df4b66

Please sign in to comment.