Skip to content

Commit

Permalink
fix zvol output when there are no zvols (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
yocalebo authored Dec 6, 2024
1 parent 80422c7 commit dbda34b
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 dbda34b

Please sign in to comment.