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
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)
gen_legends(ax, legends)
plt.savefig(ofile)
output_file = title_str = type = None
for t in types:
files = get_files(t)
output_file = title_str = type = None
for t in types:
files = get_files(t)
continue
elif t == 'bnos':
do_bnos(files)
continue
elif t == 'bnos':
do_bnos(files)
generate_output(t, get_data(files))
continue
generate_output(t, get_data(files))
continue
fatal('Need data files to process')
else:
generate_output(type, get_data(files))
fatal('Need data files to process')
else:
generate_output(type, get_data(files))