Skip to content

Commit

Permalink
fix: do not crash on pool with no volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
CertainLach authored and rustybird committed Oct 14, 2024
1 parent 30d7547 commit 54b7428
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qubesadmin/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ def volumes(self):
'dom0', 'admin.pool.volume.List', self.name, None)
except qubesadmin.exc.QubesDaemonAccessError:
raise qubesadmin.exc.QubesPropertyAccessError('volumes')
if volumes_data == b'':
return

Check warning on line 434 in qubesadmin/storage.py

View check run for this annotation

Codecov / codecov/patch

qubesadmin/storage.py#L434

Added line #L434 was not covered by tests
assert volumes_data.endswith(b'\n')
volumes_data = volumes_data[:-1].decode('ascii')
for vid in volumes_data.splitlines():
Expand Down

0 comments on commit 54b7428

Please sign in to comment.