Fixed overeager assert

Pool usage details can actually be empty.
This commit is contained in:
Marta Marczykowska-Górecka 2019-11-17 19:17:42 +01:00
父節點 9ba2ad2e29
當前提交 ba1601b5bb
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 9A752C30B26FD04B

查看文件

@ -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())