diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-05-27 16:00:29 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-05-27 16:04:30 +0200 |
| commit | b20db3b8a79c3e4e3421b1882fa80964726bdb4b (patch) | |
| tree | a38189c431fa16c5fa7069518fe3021d261590b5 /examples/find_symbol.py | |
| parent | 7427079f008155f0901a5d53f9f1d4175381a585 (diff) | |
Simplify error exits
Had missed sys.exit(msg).
Diffstat (limited to 'examples/find_symbol.py')
| -rw-r--r-- | examples/find_symbol.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/find_symbol.py b/examples/find_symbol.py index b490e4d..55e6345 100644 --- a/examples/find_symbol.py +++ b/examples/find_symbol.py @@ -171,8 +171,7 @@ def nodes_referencing_sym(node, sym_name): # imported if __name__ == "__main__": if len(sys.argv) < 3: - print('Pass symbol name (without "CONFIG_" prefix) with SCRIPT_ARG=<name>') - sys.exit(1) + sys.exit('Pass symbol name (without "CONFIG_" prefix) with SCRIPT_ARG=<name>') sym_name = sys.argv[2] @@ -180,8 +179,7 @@ if __name__ == "__main__": nodes = nodes_referencing_sym(kconf.top_node, sym_name) if not nodes: - print("No reference to '{}' found".format(sym_name)) - sys.exit() + sys.exit("No reference to '{}' found".format(sym_name)) print("Found {} locations that reference '{}':\n".format(len(nodes), sym_name)) |
