]> git.datanom.net - netconf.git/blobdiff - netconf
Add test for option record
[netconf.git] / netconf
diff --git a/netconf b/netconf
index 34443ff9db92973fab8c8d0ba6a9899b094fdb4c..25d3bff8f2f62af7886f4def1bd701d5b4c960a9 100644 (file)
--- 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:
This page took 0.04649 seconds and 5 git commands to generate.