Commit c957367f authored by Yonghong Song's avatar Yonghong Song

use builtins.input for backward/forward compability

Signed-off-by: default avatarYonghong Song <yhs@plumgrid.com>
parent 8d806c99
...@@ -30,6 +30,7 @@ from pyroute2 import IPRoute, NetNS, IPDB, NSPopen ...@@ -30,6 +30,7 @@ from pyroute2 import IPRoute, NetNS, IPDB, NSPopen
from simulation import Simulation from simulation import Simulation
import sys import sys
from time import sleep from time import sleep
from builtins import input
ipr = IPRoute() ipr = IPRoute()
ipdb = IPDB(nl=ipr) ipdb = IPDB(nl=ipr)
...@@ -92,7 +93,7 @@ try: ...@@ -92,7 +93,7 @@ try:
print(" (Neighbors are 172.16.1.100-%d, and LAN clients are 172.16.1.150-%d)" print(" (Neighbors are 172.16.1.100-%d, and LAN clients are 172.16.1.150-%d)"
% (100 + num_neighbors - 1, 150 + num_locals - 1)) % (100 + num_neighbors - 1, 150 + num_locals - 1))
print(" e.g.: ip netns exec wan0 netperf -H 172.16.1.100 -l 2") print(" e.g.: ip netns exec wan0 netperf -H 172.16.1.100 -l 2")
raw_input("Press enter when finished: ") input("Press enter when finished: ")
finally: finally:
if "sim" in locals(): sim.release() if "sim" in locals(): sim.release()
if "br100" in ipdb.interfaces: ipdb.interfaces.br100.remove().commit() if "br100" in ipdb.interfaces: ipdb.interfaces.br100.remove().commit()
......
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