commit 67a947545a781677128037e57d041af9408e3543
Author: Radek Novacek <rnovacek(a)redhat.com>
Date: Thu May 22 09:42:50 2014 +0200
Fix incompatibility with python 2.4
virt.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/virt.py b/virt.py
index cb20d71..f7bb3a8 100644
--- a/virt.py
+++ b/virt.py
@@ -30,8 +30,10 @@ class Domain(dict):
self['attributes'] = {
'hypervisorType': virt.getType(),
'virtWhoType': "libvirt",
- 'active': 1 if domain.isActive() else 0
+ 'active': 0
}
+ if domain.isActive():
+ self['attributes']['active'] = 1
self['state'] = domain.state(0)[0]
class Virt:
Show replies by date