[virt-tools-list] [PATCH virt-manager 1/4] virtinst, snapshot: do not hardcode the value of VIR_DOMAIN_PMSUSPENDED
Giuseppe Scrivano
gscrivan at redhat.com
Thu Jul 31 15:18:41 UTC 2014
Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---
virtinst/snapshot.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/virtinst/snapshot.py b/virtinst/snapshot.py
index 91d7237..54fa2ce 100644
--- a/virtinst/snapshot.py
+++ b/virtinst/snapshot.py
@@ -1,5 +1,5 @@
#
-# Copyright 2013 Red Hat, Inc.
+# Copyright 2013-2014 Red Hat, Inc.
# Cole Robinson <crobinso at redhat.com>
#
# This program is free software; you can redistribute it and/or modify
@@ -46,7 +46,7 @@ class DomainSnapshot(XMLBuilder):
"shutdown": libvirt.VIR_DOMAIN_SHUTDOWN,
"shutoff": libvirt.VIR_DOMAIN_SHUTOFF,
"crashed": libvirt.VIR_DOMAIN_CRASHED,
- "pmsuspended": 7,
+ "pmsuspended": getattr(libvirt, "VIR_DOMAIN_PMSUSPENDED", 7)
}
if state == "disk-snapshot" or state not in statemap:
--
1.9.3
More information about the virt-tools-list
mailing list