瀏覽代碼

Fixed overeager assert

Pool usage details can actually be empty.
Marta Marczykowska-Górecka 4 年之前
父節點
當前提交
ba1601b5bb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      qubesadmin/storage.py

+ 1 - 1
qubesadmin/storage.py

@@ -276,7 +276,7 @@ class Pool(object):
         pool_usage_data = self.app.qubesd_call(
             'dom0', 'admin.pool.UsageDetails', self.name, None)
         pool_usage_data = pool_usage_data.decode('utf-8')
-        assert pool_usage_data.endswith('\n')
+        assert pool_usage_data.endswith('\n') or pool_usage_data == ''
         pool_usage_data = pool_usage_data[:-1]
         return dict(l.split('=', 1) for l in pool_usage_data.splitlines())