Do not use `len(SEQUENCE)` to determine if a sequence is empty
Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
legends.append(get_base(file))
idx += 1
- if add_legend and len(legends) > 0:
+ if add_legend and legends:
gen_legends(ax, legends)
plt.savefig(ofile)
output_file = title_str = type = None
for t in types:
files = get_files(t)
- if len(files) == 0:
+ if files == 0:
continue
elif t == 'bnos':
do_bnos(files)
generate_output(t, get_data(files))
continue
- elif len(files) < 1:
+ elif not files:
fatal('Need data files to process')
else:
generate_output(type, get_data(files))