fixed updated raised exceptions to be 2/3 compatible

This commit is contained in:
bharnden 2019-05-05 16:56:18 -07:00
parent feebd8704f
commit b42b5b1a5a
3 changed files with 3 additions and 4 deletions

View file

@ -130,8 +130,7 @@ class Route(object):
try:
self.prefix = ipaddress.Ipv4Prefix(prefix)
except Exception, e:
raise ValueError, "Invalid prefix given to Route object: %s\n%s" % \
(prefix, e)
raise ValueError("Invalid prefix given to Route object: %s\n%s" % (prefix, e))
self.gw = gw
self.metric = metric