Module: kamailio Branch: 5.1 Commit: cd0fe9e469c60be0b5c22cfa62f33cc70c12bb1f URL: https://github.com/kamailio/kamailio/commit/cd0fe9e469c60be0b5c22cfa62f33cc7...
Author: Henning Westerholt hw@skalatan.de Committer: Henning Westerholt hw@skalatan.de Date: 2019-09-21T21:25:25+02:00
tools: fix python exception usage in route_graph.py tool
(cherry picked from commit 4a66e500ddb6028d3dfcf67aca951282309b6ea4)
---
Modified: misc/tools/route_graph/route_graph.py
---
Diff: https://github.com/kamailio/kamailio/commit/cd0fe9e469c60be0b5c22cfa62f33cc7... Patch: https://github.com/kamailio/kamailio/commit/cd0fe9e469c60be0b5c22cfa62f33cc7...
---
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: