Commit e2186faf authored by Martín Ferrari's avatar Martín Ferrari

Check max number of nodes

parent dce284fa
......@@ -49,6 +49,9 @@ def main():
sys.exit(0)
elif o in ("-n", "--nodes"):
nr = int(a)
if nr > 65:
error = "Invalid value for %s: %s" % (o, a)
break
elif o in ("-s", "--pktsize"):
pktsize = int(a)
elif o in ("-t", "--time"):
......@@ -68,7 +71,7 @@ def main():
continue # avoid the value check
elif o == "--format":
if a not in ('csv', 'brief', 'verbose'):
error = "Invalid format: %s" % a
error = "Invalid value for %s: %s" % (o, a)
break
format = a
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment