[PATCH virt-manager 1/4] virtinst, snapshot: do not hardcode the value of VIR_DOMAIN_PMSUSPENDED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx>
---
 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@xxxxxxxxxx>
 #
 # 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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux