Skip to content

Commit

Permalink
tools: fix python exception usage in route_graph.py tool
Browse files Browse the repository at this point in the history
  • Loading branch information
henningw committed Sep 20, 2019
1 parent 545ef51 commit 4a66e50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc/tools/route_graph/route_graph.py
Expand Up @@ -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:
Expand Down

0 comments on commit 4a66e50

Please sign in to comment.