]> git.datanom.net - netconf.git/commitdiff
Add test for option record
authorMichael Rasmussen <mir@datanom.net>
Wed, 5 Apr 2017 20:34:57 +0000 (22:34 +0200)
committerMichael Rasmussen <mir@datanom.net>
Wed, 5 Apr 2017 20:34:57 +0000 (22:34 +0200)
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.030961 seconds and 5 git commands to generate.