Skip to content

Commit

Permalink
silence a python travis-ci warning
Browse files Browse the repository at this point in the history
The travis-ci flags a python warning:

  $ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
  ./tools/biolatpcts.py:123:5: F821 undefined name 'die'
      die()
      ^
  1     F821 undefined name 'die'

Let us fix it with proper error message and then exit().

Signed-off-by: Yonghong Song <[email protected]>
  • Loading branch information
yonghong-song committed Jun 3, 2020
1 parent be5d68c commit da0d82c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/biolatpcts.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
elif args.which == 'on-device':
start_time_field = 'io_start_time_ns'
else:
die()
print("Invalid latency measurement {}".format(args.which))
exit()

bpf_source = bpf_source.replace('__START_TIME_FIELD__', start_time_field)
bpf_source = bpf_source.replace('__MAJOR__', str(major))
Expand Down

0 comments on commit da0d82c

Please sign in to comment.