cleanup-dispvms 239 B

123456789101112
  1. #!/usr/bin/python
  2. from qubesadmin import Qubes
  3. def main():
  4. app = Qubes()
  5. for vm in app.domains:
  6. if vm.klass == 'DispVM' and not vm.is_running():
  7. if vm.auto_cleanup:
  8. del app.domains[vm]
  9. main()