Skip to content

Commit

Permalink
fix zvol output when there are no zvols (#251)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2345c46)

Co-authored-by: Caleb <[email protected]>
  • Loading branch information
bugclerk and yocalebo authored Dec 6, 2024
1 parent 3d48030 commit 9136330
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ixdiagnose/plugins/zfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def resource_output(client: MiddlewareClient, resource_type: str) -> str:
output = ''
prop_dict = {}
output_lines = cp.stdout.splitlines()
if not output_lines:
# happens when no zvols, for example
return output

props_header = output_lines[0]
for index, resource_line in enumerate(filter(bool, map(str.strip, output_lines[1:]))):
resource_name = resource_line.split()[0].strip()
Expand Down

0 comments on commit 9136330

Please sign in to comment.