sjstein / tpMonitor

Python monitor script to connect to tpServer
0 stars 0 forks source link

Use argument choices parameter for validation #33

Closed sjstein closed 4 years ago

sjstein commented 4 years ago

Per comment from @c-to-the-fazzy :

There's a kwarg on the parser.add_argument called choices that sets the allowable values for a CL argument. It's usage would be something like choices = [0, 1, 2] up on line 61, and it would do this type of error checking automagically.

This will allow cleaning up range validation for certain CL arguments