updated caught exceptions to be 2/3 compliant
This commit is contained in:
parent
b42b5b1a5a
commit
5b7453b906
3 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue