diff --git a/sdb/commands/zfs/histograms.py b/sdb/commands/zfs/histograms.py index 6f9eb48..04bc480 100644 --- a/sdb/commands/zfs/histograms.py +++ b/sdb/commands/zfs/histograms.py @@ -133,8 +133,7 @@ def print_histogram(hist: drgn.Object, max_count = count HISTOGRAM_WIDTH_MAX = 40 - if max_count < HISTOGRAM_WIDTH_MAX: - max_count = HISTOGRAM_WIDTH_MAX + max_count = max(max_count, HISTOGRAM_WIDTH_MAX) if min_bucket > max_bucket: print(f'{" " * indent}** No histogram data available **') diff --git a/sdb/pipeline.py b/sdb/pipeline.py index 35b39fe..f5a2dac 100644 --- a/sdb/pipeline.py +++ b/sdb/pipeline.py @@ -129,6 +129,12 @@ def invoke(myprog: drgn.Program, first_input: Iterable[drgn.Object], # at the end. # if shell_cmd is not None: + # + # This is a false-positive from pylint as we need + # to explicitly wait for shell_proc to be done and + # re-arrange our std_out. + # + # pylint: disable=consider-using-with shell_proc = subprocess.Popen(shell_cmd, shell=True, stdin=subprocess.PIPE,