X-Git-Url: http://git.datanom.net/netconf.git/blobdiff_plain/db08f9b3c3ddc29ecbafd0de07644c16c81c0680..e8e90d5ac872f27ce57d0f3451016f83949c1315:/netconf diff --git a/netconf b/netconf index 34443ff..25d3bff 100644 --- a/netconf +++ b/netconf @@ -183,11 +183,18 @@ def parse_input(): record = True else: assert False, 'Unhandled option' - - if not address or not interface: - print 'Error: missing options' - usage() - sys.exit(2) + + if (record): + if not (bool(address) ^ bool(interface)): + print 'Error: missing options' + usage() + sys.exit(2) + else: + if not address or not interface or error: + print 'Error: missing options' + usage() + sys.exit(2) + if address == '0': address = None if not netmask: