core-admin/linux/aux-tools/cleanup-dispvms
Marek Marczykowski-Górecki f738f5d4d8
Fix cleanup-dispvms script
qubesadmin.Qubes().domains do not support indexing by VM object.

QubesOS/qubes-issues#3037
2017-12-14 23:26:52 +01:00

13 lines
244 B
Python
Executable File

#!/usr/bin/python
from qubesadmin import Qubes
def main():
app = Qubes()
for vm in app.domains:
if vm.klass == 'DispVM' and not vm.is_running():
if vm.auto_cleanup:
del app.domains[vm.name]
main()