From 8cd2718293beb2a228137627a2f615072cacb3b0 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Sat, 14 Sep 2024 00:09:19 +0200 Subject: [PATCH] fix: do not crash on pool with no volumes (cherry picked from commit 54b7428f3459832067d9746840396cbc3ba0c3fc) --- qubesadmin/storage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qubesadmin/storage.py b/qubesadmin/storage.py index 27f56965b..99e8d8169 100644 --- a/qubesadmin/storage.py +++ b/qubesadmin/storage.py @@ -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():