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
parent 9ba2ad2e29
commit ba1601b5bb
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B

View File

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