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
(cherry picked from commit 54b7428)
  • Loading branch information
CertainLach authored and marmarek committed Nov 5, 2024
1 parent f0c4469 commit 8cd2718
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
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 8cd2718

Please sign in to comment.