[prev in list] [next in list] [prev in thread] [next in thread]
List: virt-who-devel
Subject: [virt-who] virt: always call base class constructor
From: Radek Novacek <rnovacek () fedoraproject ! org>
Date: 2014-11-12 10:01:44
Message-ID: 20141112100145.0BFE7613E7 () fedorahosted ! org
[Download RAW message or body]
commit 7b54ce087ebe8474aec6ec0bd1a7b90218054283
Author: Radek Novacek <rnovacek@redhat.com>
Date: Wed Nov 12 11:01:11 2014 +0100
virt: always call base class constructor
virt/esx/esx.py | 2 +-
virt/hyperv/hyperv.py | 2 +-
virt/libvirtd/libvirtd.py | 3 +--
virt/rhevm/rhevm.py | 3 +--
virt/vdsm/vdsm.py | 3 +--
virt/virt.py | 3 ++-
6 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/virt/esx/esx.py b/virt/esx/esx.py
index 743887b..7e2302a 100644
--- a/virt/esx/esx.py
+++ b/virt/esx/esx.py
@@ -112,7 +112,7 @@ class Esx(virt.Virt):
CONFIG_TYPE = "esx"
def __init__(self, logger, config):
- self.logger = logger
+ super(Esx, self).__init__(logger, config)
self.url = config.server
self.username = config.username
self.password = config.password
diff --git a/virt/hyperv/hyperv.py b/virt/hyperv/hyperv.py
index 3302ea1..b2cdfbe 100644
--- a/virt/hyperv/hyperv.py
+++ b/virt/hyperv/hyperv.py
@@ -179,7 +179,7 @@ class HyperV(virt.Virt):
CONFIG_TYPE = "hyperv"
def __init__(self, logger, config):
- self.logger = logger
+ super(HyperV, self).__init__(logger, config)
url = config.server
self.username = config.username
self.password = config.password
diff --git a/virt/libvirtd/libvirtd.py b/virt/libvirtd/libvirtd.py
index a45c2bf..a9a9b28 100644
--- a/virt/libvirtd/libvirtd.py
+++ b/virt/libvirtd/libvirtd.py
@@ -137,9 +137,8 @@ class Libvirtd(virt.Virt):
CONFIG_TYPE = "libvirt"
def __init__(self, logger, config, registerEvents=True):
+ super(Libvirtd, self).__init__(logger, config)
self.changedCallback = None
- self.logger = logger
- self.config = config
self.registerEvents = registerEvents
self._host_uuid = None
libvirt.registerErrorHandler(lambda ctx, error: None, None)
diff --git a/virt/rhevm/rhevm.py b/virt/rhevm/rhevm.py
index 8bb540e..2da373b 100644
--- a/virt/rhevm/rhevm.py
+++ b/virt/rhevm/rhevm.py
@@ -36,8 +36,7 @@ class RhevM(virt.Virt):
CONFIG_TYPE = "rhevm"
def __init__(self, logger, config):
- self.logger = logger
- self.config = config
+ super(RhevM, self).__init__(logger, config)
self.url = self.config.server
if "//" not in self.url:
self.url = "//" + self.config.server
diff --git a/virt/vdsm/vdsm.py b/virt/vdsm/vdsm.py
index 2c0ad17..c3aaa51 100644
--- a/virt/vdsm/vdsm.py
+++ b/virt/vdsm/vdsm.py
@@ -37,8 +37,7 @@ class Vdsm(Virt):
CONFIG_TYPE = "vdsm"
def __init__(self, logger, config):
- self.logger = logger
- self.config = config
+ super(Vdsm, self).__init__(logger, config)
self._readConfig("/etc/vdsm/vdsm.conf")
self.connect()
diff --git a/virt/virt.py b/virt/virt.py
index 8d1de05..e8f1e50 100644
--- a/virt/virt.py
+++ b/virt/virt.py
@@ -42,7 +42,8 @@ class Domain(dict):
class Virt(object):
- def __init__(self, config):
+ def __init__(self, logger, config):
+ self.logger = logger
self.config = config
@classmethod
_______________________________________________
virt-who-devel mailing list
virt-who-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/virt-who-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic