Quellcode durchsuchen

qubes-pool skip DomainPools without volumes

Bahtiar `kalkin-` Gadimov vor 8 Jahren
Ursprung
Commit
90928dc4a0
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 4 1
      qubes/tools/qvm_pool.py

+ 4 - 1
qubes/tools/qvm_pool.py

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