exception where af is specified with no other arguments
bsholdice opened this issue · 1 comments
bsholdice commented
I get a python exception when I specify the address family but forget an argument.
e.g.
bsholdice@mbp ~/Code/others/iproute2mac/src ±master » ./ip.py -6 1 ↵
Traceback (most recent call last):
File "./ip.py", line 553, in <module>
main(sys.argv[1:])
File "./ip.py", line 55, in inner
if not func(*args, **kwargs):
File "./ip.py", line 535, in main
if argv[0] == '-V':
IndexError: list index out of range
obviously I mean to include an argument (ip -4 a
or ip -4 r
etc) so this is definitely a user error. But I do it so frequently I thought I'd open PR #25 to handle it.
Thanks for writing this wrapper. very handy!
brona commented
Merged and about to cut a release