Skip to content

Commit 3e6c69a

Browse files
authored
Merge pull request #278 from sdimitro/fix_pylint_0
Fix Current Pylint Errors
2 parents d0cb398 + 7a9067b commit 3e6c69a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

sdb/commands/zfs/histograms.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ def print_histogram(hist: drgn.Object,
133133
max_count = count
134134

135135
HISTOGRAM_WIDTH_MAX = 40
136-
if max_count < HISTOGRAM_WIDTH_MAX:
137-
max_count = HISTOGRAM_WIDTH_MAX
136+
max_count = max(max_count, HISTOGRAM_WIDTH_MAX)
138137

139138
if min_bucket > max_bucket:
140139
print(f'{" " * indent}** No histogram data available **')

sdb/pipeline.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ def invoke(myprog: drgn.Program, first_input: Iterable[drgn.Object],
129129
# at the end.
130130
#
131131
if shell_cmd is not None:
132+
#
133+
# This is a false-positive from pylint as we need
134+
# to explicitly wait for shell_proc to be done and
135+
# re-arrange our std_out.
136+
#
137+
# pylint: disable=consider-using-with
132138
shell_proc = subprocess.Popen(shell_cmd,
133139
shell=True,
134140
stdin=subprocess.PIPE,

0 commit comments

Comments
 (0)