More pylint fixes

This commit is contained in:
Cole Robinson
2010-11-29 17:28:52 -05:00
parent 716bec3e56
commit 81eb69853f
5 changed files with 22 additions and 13 deletions

View File

@ -93,6 +93,14 @@ class vmmDomainBase(vmmLibvirtObject):
self.uuid = uuid
self.cloning = False
self.record = []
self.maxRecord = {
"diskRdRate" : 10.0,
"diskWrRate" : 10.0,
"netTxRate" : 10.0,
"netRxRate" : 10.0,
}
self._install_abort = False
self._startup_vcpus = None
@ -166,6 +174,9 @@ class vmmDomainBase(vmmLibvirtObject):
def hotplug_both_mem(self, memory, maxmem):
raise NotImplementedError()
def _get_guest(self, inactive=False, refresh_if_necc=True):
raise NotImplementedError()
def _invalidate_xml(self):
vmmLibvirtObject._invalidate_xml(self)
self._guest_to_define = None
@ -905,12 +916,6 @@ class vmmDomain(vmmDomainBase):
vmmDomainBase.__init__(self, config, connection, backend, uuid)
self.lastStatus = libvirt.VIR_DOMAIN_SHUTOFF
self.record = []
self.maxRecord = { "diskRdRate" : 10.0,
"diskWrRate" : 10.0,
"netTxRate" : 10.0,
"netRxRate" : 10.0,
}
self.config.on_stats_enable_net_poll_changed(
self.toggle_sample_network_traffic)

View File

@ -23,7 +23,6 @@ import gobject
import virtinst
from virtinst import Interface
from virtManager import util
from virtManager.libvirtobject import vmmLibvirtObject
class vmmInterface(vmmLibvirtObject):
@ -112,7 +111,7 @@ class vmmInterface(vmmLibvirtObject):
return doc.serialize()
self._redefine(util.xml_parse_wrapper, set_start_xml)
self._redefine_xml(set_start_xml)
def get_slaves(self):

View File

@ -65,6 +65,9 @@ class vmmLibvirtObject(gobject.GObject):
# Functions that should probably be overridden in sub class #
#############################################################
def get_name(self):
raise NotImplementedError()
def _XMLDesc(self, flags):
ignore = flags
return

View File

@ -562,7 +562,7 @@ class vmmManager(gobject.GObject):
self.emit("action-show-host", conn.get_uri())
else:
self.emit("action-show-console",
conn.get_uri(), self.vm.get_uuid())
conn.get_uri(), vm.get_uuid())
def do_delete(self, ignore=None):
conn = self.current_connection()

View File

@ -33,8 +33,9 @@ OS_EXIT="protected member _exit of a client class"
BTYPE_LIST="(vmmConnect.add_service|vmmConnect.remove_service|vmmConnect.add_conn_to_list)"
BUILTIN_TYPE="${BTYPE_LIST}.*Redefining built-in 'type'"
# Bogus 'unable to import' warnings
# Types can't be inferred errors
INFER_LIST="(MenuItem|StatusIcon)"
INFER_ERRORS="Instance of '${INFER_LIST}'.*not be inferred"
DMSG=""
addmsg() {
@ -46,7 +47,7 @@ addchecker() {
}
addmsg_support() {
out=`pylint --list-msgs`
out=`pylint --list-msgs 2>&1`
if `echo $out | grep -q $1` ; then
addmsg "$1"
fi
@ -83,7 +84,7 @@ SHOW_REPORT="n"
AWK=awk
[ `uname -s` = 'SunOS' ] && AWK=nawk
pylint --ignore=IPy.py $FILES \
pylint --ignore=$IGNOREFILES $FILES \
--reports=$SHOW_REPORT \
--output-format=colorized \
--dummy-variables-rgx="dummy|ignore*" \
@ -100,6 +101,7 @@ pylint --ignore=IPy.py $FILES \
-ve "$BUILTIN_TYPE" \
-ve "$ERROR_VBOX" \
-ve "$UNABLE_IMPORT" \
-ve "$INFER_ERRORS" \
-ve "$EXCEPTHOOK" | \
$AWK '\
# Strip out any "*** Module name" lines if we dont list any errors for them