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(): ...@@ -49,6 +49,9 @@ def main():
sys.exit(0) sys.exit(0)
elif o in ("-n", "--nodes"): elif o in ("-n", "--nodes"):
nr = int(a) nr = int(a)
if nr > 65:
error = "Invalid value for %s: %s" % (o, a)
break
elif o in ("-s", "--pktsize"): elif o in ("-s", "--pktsize"):
pktsize = int(a) pktsize = int(a)
elif o in ("-t", "--time"): elif o in ("-t", "--time"):
...@@ -68,7 +71,7 @@ def main(): ...@@ -68,7 +71,7 @@ def main():
continue # avoid the value check continue # avoid the value check
elif o == "--format": elif o == "--format":
if a not in ('csv', 'brief', 'verbose'): if a not in ('csv', 'brief', 'verbose'):
error = "Invalid format: %s" % a error = "Invalid value for %s: %s" % (o, a)
break break
format = a format = a
continue 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