From d3ee5a3e16750655c0c106613028b27a8d00e427 Mon Sep 17 00:00:00 2001 From: Henning Westerholt Date: Fri, 20 Sep 2019 12:02:03 +0200 Subject: [PATCH] tools: fix python exception usage in route_graph.py tool (cherry picked from commit 4a66e500ddb6028d3dfcf67aca951282309b6ea4) --- misc/tools/route_graph/route_graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/tools/route_graph/route_graph.py b/misc/tools/route_graph/route_graph.py index 135440a3c5b..b416bdc186d 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: