Module: kamailio
Branch: master
Commit: 4a66e500ddb6028d3dfcf67aca951282309b6ea4
URL:
https://github.com/kamailio/kamailio/commit/4a66e500ddb6028d3dfcf67aca95128…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-09-20T12:02:03+02:00
tools: fix python exception usage in route_graph.py tool
---
Modified: misc/tools/route_graph/route_graph.py
---
Diff:
https://github.com/kamailio/kamailio/commit/4a66e500ddb6028d3dfcf67aca95128…
Patch:
https://github.com/kamailio/kamailio/commit/4a66e500ddb6028d3dfcf67aca95128…
---
diff --git a/misc/tools/route_graph/route_graph.py
b/misc/tools/route_graph/route_graph.py
index 135440a3c5..b416bdc186 100755
--- a/misc/tools/route_graph/route_graph.py
+++ b/misc/tools/route_graph/route_graph.py
@@ -75,12 +75,12 @@ def traverse_routes(_level, _name):
if len(sys.argv) < 2:
- raise "usage: %s configuration-file [max_depth]" % sys.argv[0]
+ raise Exception('wrong number of arguments\nusage: ' + sys.argv[0] + '
configuration-file [max_depth]')
if len(sys.argv) == 3:
max_depth = int(sys.argv[2])
cfg = file(sys.argv[1], "r")
if cfg is None:
- raise "Missing config file"
+ raise Exception ('Missing config file')
line = cfg.readline()
rt = routes
while line: