qubes-pool skip DomainPools without volumes

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-05-26 18:57:13 +02:00
parent c8363cfc95
commit 90928dc4a0
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE

View File

@ -84,7 +84,10 @@ def list_pools(app):
''' Prints out all known pools and their drivers '''
result = [('NAME', 'DRIVER')]
for pool in app.pools.values():
result += [(pool.name, pool.driver)]
if len(pool.volumes) > 0 and not issubclass(
pool.__class__, qubes.storage.domain.DomainPool):
# skip empty DomainPools
result += [(pool.name, pool.driver)]
qubes.tools.print_table(result)