Skip to content

Commit

Permalink
auto_analyze nice exit on empty rawdata input
Browse files Browse the repository at this point in the history
  • Loading branch information
NiKiZe committed May 23, 2020
1 parent dcb7adf commit 3c6b652
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/auto_analyse_raw_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,13 @@ def main():
add_rawdata_args(arg_parser)
arg_options = arg_parser.parse_args()

parse_and_report(get_rawdata(arg_options), arg_options.margin,
raw_data = get_rawdata(arg_options).strip()
if not raw_data:
arg_parser.print_help(sys.stderr)
sys.stderr.write("error: no rawdata content\n")
sys.exit(1)

parse_and_report(raw_data, arg_options.margin,
arg_options.gen_code, arg_options.name)


Expand Down

0 comments on commit 3c6b652

Please sign in to comment.