Skip to content

Commit

Permalink
tools: Ensure that --serial or --udp are specified
Browse files Browse the repository at this point in the history
At least one receiver has to be specified, otherwise the application
would just exit without an action.
  • Loading branch information
fetzerch committed Feb 3, 2020
1 parent 4eb002e commit 79e6e65
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/weather_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ def _parse_arguments(cls):
"(e.g. 'study:*, garden:rf433_1')")

args = parser.parse_args()

if not args.serial and not args.udp:
parser.error("Either --serial or --udp has to be specified")

return args

def __init__(self):
Expand Down

0 comments on commit 79e6e65

Please sign in to comment.