mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Don't use old style __gobject_init__()
This commit is contained in:
parent
749b6cdc88
commit
779dcdd824
@ -70,7 +70,7 @@ class vmmAddHardware(gobject.GObject):
|
||||
gobject.TYPE_NONE, [str]),
|
||||
}
|
||||
def __init__(self, config, vm):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.vm = vm
|
||||
self.conn = vm.get_connection()
|
||||
|
@ -43,7 +43,7 @@ class vmmAsyncJob(gobject.GObject):
|
||||
text=_("Please wait a few moments..."),
|
||||
title=_("Operation in progress"),
|
||||
run_main=True):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.run_main = bool(run_main)
|
||||
|
||||
|
@ -35,7 +35,7 @@ class vmmChooseCD(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, dev_id_info, connection, media_type):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.window = gtk.glade.XML(
|
||||
config.get_glade_dir() + "/vmm-choose-cd.glade",
|
||||
"vmm-choose-cd", domain="virt-manager")
|
||||
|
@ -69,7 +69,7 @@ class vmmCloneVM(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, orig_vm):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.orig_vm = orig_vm
|
||||
|
||||
|
@ -55,7 +55,7 @@ class vmmConnect(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, engine):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.engine = engine
|
||||
|
||||
self.window = gtk.glade.XML(
|
||||
|
@ -101,7 +101,7 @@ class vmmConnection(gobject.GObject):
|
||||
STATE_INACTIVE = 3
|
||||
|
||||
def __init__(self, config, uri, readOnly=None, engine=None):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
self.config = config
|
||||
self.engine = engine
|
||||
|
@ -49,7 +49,7 @@ def has_property(obj, setting):
|
||||
|
||||
class vmmConsolePages(gobject.GObject):
|
||||
def __init__(self, config, vm, engine, window):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
self.config = config
|
||||
self.vm = vm
|
||||
|
@ -68,7 +68,7 @@ class vmmCreate(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, engine):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.engine = engine
|
||||
|
||||
|
@ -67,7 +67,7 @@ class vmmCreateInterface(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, conn):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.conn = conn
|
||||
self.interface = None
|
||||
|
@ -45,7 +45,7 @@ class vmmCreateNetwork(gobject.GObject):
|
||||
gobject.TYPE_NONE, [str]),
|
||||
}
|
||||
def __init__(self, config, conn):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.conn = conn
|
||||
|
||||
|
@ -40,7 +40,7 @@ class vmmCreatePool(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, conn):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.conn = conn
|
||||
self.config = config
|
||||
|
||||
|
@ -40,7 +40,7 @@ class vmmCreateVolume(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, conn, parent_pool):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.conn = conn
|
||||
self.parent_pool = parent_pool
|
||||
self.config = config
|
||||
|
@ -47,7 +47,7 @@ class vmmDeleteDialog(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, vm):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.vm = vm
|
||||
self.conn = vm.connection
|
||||
|
@ -250,7 +250,7 @@ class vmmDetails(gobject.GObject):
|
||||
|
||||
|
||||
def __init__(self, config, vm, engine, parent=None):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.vm = vm
|
||||
self.conn = self.vm.get_connection()
|
||||
|
@ -217,7 +217,7 @@ class vmmEngine(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
self.config = config
|
||||
|
||||
|
@ -42,7 +42,7 @@ class vmmHalHelper(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
self.bus = None
|
||||
self.hal_iface = None
|
||||
|
@ -52,7 +52,7 @@ class vmmHost(gobject.GObject):
|
||||
gobject.TYPE_NONE, (str,)),
|
||||
}
|
||||
def __init__(self, config, conn, engine):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.conn = conn
|
||||
self.engine = engine
|
||||
|
@ -44,7 +44,7 @@ class vmmLibvirtObject(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, connection):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.connection = connection
|
||||
|
||||
|
@ -117,7 +117,7 @@ class vmmManager(gobject.GObject):
|
||||
gobject.TYPE_NONE, []),}
|
||||
|
||||
def __init__(self, config, engine):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.engine = engine
|
||||
|
||||
|
@ -62,7 +62,7 @@ class vmmMediaDevice(gobject.GObject):
|
||||
|
||||
def __init__(self, path, key, has_media, media_label, media_key,
|
||||
nodedev_obj = None, media_type = MEDIA_CDROM):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
self.path = path
|
||||
self.key = key
|
||||
|
@ -51,7 +51,7 @@ class vmmMigrateDialog(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, vm, engine):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.vm = vm
|
||||
self.conn = vm.connection
|
||||
|
@ -23,7 +23,7 @@ class vmmNetDevice(gobject.GObject):
|
||||
__gsignals__ = {}
|
||||
|
||||
def __init__(self, name, mac, is_shared, bridge=None, hal_path=None):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
self.name = name
|
||||
self.mac = mac
|
||||
|
@ -50,7 +50,7 @@ class vmmNetwork(gobject.GObject):
|
||||
return desc
|
||||
|
||||
def __init__(self, config, connection, net, uuid, active):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.connection = connection
|
||||
self.net = net
|
||||
|
@ -32,7 +32,7 @@ class vmmPreferences(gobject.GObject):
|
||||
gobject.TYPE_NONE, [str]),
|
||||
}
|
||||
def __init__(self, config):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.window = gtk.glade.XML(config.get_glade_dir() + "/vmm-preferences.glade", "vmm-preferences", domain="virt-manager")
|
||||
self.config = config
|
||||
|
||||
|
@ -40,7 +40,7 @@ class vmmStorageBrowser(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, conn):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.conn = conn
|
||||
|
||||
|
@ -30,7 +30,7 @@ class vmmStoragePool(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, connection, pool, uuid, active):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.connection = connection
|
||||
self.pool = pool # Libvirt pool object
|
||||
|
@ -25,7 +25,7 @@ class vmmStorageVolume(gobject.GObject):
|
||||
__gsignals__ = { }
|
||||
|
||||
def __init__(self, config, connection, vol, name):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
self.config = config
|
||||
self.connection = connection
|
||||
self.vol = vol # Libvirt storage volume object
|
||||
|
@ -69,7 +69,7 @@ class vmmSystray(gobject.GObject):
|
||||
}
|
||||
|
||||
def __init__(self, config, engine):
|
||||
self.__gobject_init__()
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
self.config = config
|
||||
self.engine = engine
|
||||
|
@ -16,8 +16,6 @@ NO_PYL_CONFIG=".*No config file found.*"
|
||||
GETTEXT_VAR="Undefined variable '_'"
|
||||
|
||||
# These all work fine and are legit, just false positives
|
||||
GOBJECT_VAR="has no '__gobject_init__' member"
|
||||
GOBJECT_INIT="__init__ method from base class 'GObject' is not called"
|
||||
EMIT_VAR="has no 'emit' member"
|
||||
ERROR_VBOX="Class 'vbox' has no 'pack_start' member"
|
||||
EXCEPTHOOK="no '__excepthook__' member"
|
||||
@ -91,8 +89,6 @@ pylint --ignore=$IGNOREFILES $FILES \
|
||||
--disable=${DMSG}\
|
||||
--disable=${DCHECKERS} 2>&1 | \
|
||||
egrep -ve "$NO_PYL_CONFIG" \
|
||||
-ve "$GOBJECT_VAR" \
|
||||
-ve "$GOBJECT_INIT" \
|
||||
-ve "$EMIT_VAR" \
|
||||
-ve "$CONNECT_VAR" \
|
||||
-ve "$DISCONNECT_VAR" \
|
||||
|
Loading…
Reference in New Issue
Block a user