summaryrefslogtreecommitdiff
path: root/vyroute/basic_function/OSPFRoute.py
diff options
context:
space:
mode:
authorHochikong <michellehzg@gmail.com>2016-06-08 10:59:52 +0800
committerHochikong <michellehzg@gmail.com>2016-06-08 10:59:52 +0800
commita4a14765415f8252e94307f657383a3ee66d2fa7 (patch)
tree2a78195d4e3a3bd882cc46b3e413c65e31db1709 /vyroute/basic_function/OSPFRoute.py
parent99bfc986fe21ddf8c5c91a77e6db9c59d91cdb15 (diff)
downloadpython-vyos-mgmt-a4a14765415f8252e94307f657383a3ee66d2fa7.tar.gz
python-vyos-mgmt-a4a14765415f8252e94307f657383a3ee66d2fa7.zip
T85:Python management library is not Python3 compatible.
Fix Router.py and all file in basic_function/ to support Python3.
Diffstat (limited to 'vyroute/basic_function/OSPFRoute.py')
-rw-r--r--vyroute/basic_function/OSPFRoute.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/vyroute/basic_function/OSPFRoute.py b/vyroute/basic_function/OSPFRoute.py
index 1290467..0c3367c 100644
--- a/vyroute/basic_function/OSPFRoute.py
+++ b/vyroute/basic_function/OSPFRoute.py
@@ -16,7 +16,7 @@ def ospfarea(obj, data):
# Configure ospf area
obj.execute(ospf_basic_configuration % (data['config']['area'], data['config']['network']))
return {"Result": "Configured successfully"}
- except Exception, e:
+ except Exception as e:
return {"Error": e}
@@ -36,7 +36,7 @@ def router_id(obj, data):
# Configure router id
obj.execute(router_id_configuration % data['config']['id'])
return {"Result": "Configured successfully"}
- except Exception, e:
+ except Exception as e:
return {"Error": e}
@@ -58,7 +58,7 @@ def ospf_redistribute(obj, data):
obj.execute(redistribute_configuration['0'] % data['config']['type'])
obj.execute(redistribute_configuration['1'])
return {"Result": "Configured successfully"}
- except Exception, e:
+ except Exception as e:
return {"Error": e}
@@ -72,7 +72,7 @@ def ospf_adjacency(obj):
try:
obj.execute(log_adjacency_changes_configuration)
return {"Result": "Configured successfully"}
- except Exception, e:
+ except Exception as e:
return {"Error": e}
@@ -97,7 +97,7 @@ def ospf_default_route(obj, data):
obj.execute(default_route_configuration['1'] % data['config']['metric'])
obj.execute(default_route_configuration['2'] % data['config']['metric-type'])
return {"Result": "Configured successfully"}
- except Exception, e:
+ except Exception as e:
return {"Error": e}
@@ -119,5 +119,5 @@ def ospf_route_map(obj, data):
obj.execute(route_map_configuration['0'] % data['config']['rule'])
obj.execute(route_map_configuration['1'] % (data['config']['rule'], data['config']['interface']))
return {"Result": "Configured successfully"}
- except Exception, e:
+ except Exception as e:
return {"Error": e}