updated caught exceptions to be 2/3 compliant

This commit is contained in:
bharnden 2019-05-05 16:58:08 -07:00
parent b42b5b1a5a
commit 5b7453b906
3 changed files with 6 additions and 6 deletions

View file

@ -49,11 +49,11 @@ from core.nodes import ipaddress
try:
import emaneeventservice
import emaneeventpathloss
except Exception, e:
except Exception as e:
try:
from emanesh.events import EventService
from emanesh.events import PathlossEvent
except Exception, e2:
except Exception as e2:
raise ImportError("failed to import EMANE Python bindings:\n%s\n%s" % (e, e2))
# global Experiment object (for interaction with "python -i")
@ -256,7 +256,7 @@ class IperfCmd(ClientServerCmd):
lines = self.out.readlines()
try:
bps = int(lines[-1].split(",")[-1].strip("\n"))
except Exception, e:
except Exception as e:
self.warn("iperf parsing exception: %s" % e)
bps = 0
return bps