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: