aboutsummaryrefslogtreecommitdiffstats
path: root/pySim/utils.py
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2024-05-24 11:17:53 +0200
committerlaforge <laforge@osmocom.org>2024-05-24 20:23:35 +0000
commit6add18ea087a0849307c0d0a3d41f8df5a8a82ac (patch)
treed9d9143a603aa62dec7f845e3de0b822f6184153 /pySim/utils.py
parent56264669a7548ca4c0cc816cea67472b1a7ff1dc (diff)
contrib/sim-rest-client: don't crash without argsHEADmaster
When running without an argument, let argparse print a nice usage error: $ ./sim-rest-client.py usage: sim-rest-client.py [-h] [-H HOST] [-p PORT] [-v] [-n SLOT_NR] {auth,info} ... sim-rest-client.py: error: the following arguments are required: {auth,info} Instead of: $ ./sim-rest-client.py Traceback (most recent call last): File "/usr/share/pysim/contrib/./sim-rest-client.py", line 185, in <module> main(sys.argv) File "/usr/share/pysim/contrib/./sim-rest-client.py", line 181, in main args.func(args) ^^^^^^^^^ AttributeError: 'Namespace' object has no attribute 'func' Change-Id: I92998d9b94dcfb9dcfc3da161fe5d8f45f242b78
Diffstat (limited to 'pySim/utils.py')
0 files changed, 0 insertions, 0 deletions