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

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