Make pylint happier

This commit is contained in:
Frédéric Pierret (fepitre) 2019-10-20 16:40:40 +02:00
parent 9734921d9c
commit d2d1ffb806
No known key found for this signature in database
GPG Key ID: 484010B5CDC576E2
3 changed files with 10 additions and 8 deletions

View File

@ -723,8 +723,8 @@ class Qubes(qubes.PropertyHolder):
default_netvm = qubes.VMProperty('default_netvm', load_stage=3, default_netvm = qubes.VMProperty('default_netvm', load_stage=3,
default=None, allow_none=True, default=None, allow_none=True,
setter=_setter_default_netvm, setter=_setter_default_netvm,
doc="""Default NetVM for AppVMs. Initial doc="""Default NetVM for AppVMs. Initial
state is `None`, which means that AppVMs state is `None`, which means that AppVMs
are not connected to the Internet.""") are not connected to the Internet.""")
default_template = qubes.VMProperty('default_template', load_stage=3, default_template = qubes.VMProperty('default_template', load_stage=3,
vmclass=qubes.vm.templatevm.TemplateVM, vmclass=qubes.vm.templatevm.TemplateVM,
@ -732,7 +732,7 @@ class Qubes(qubes.PropertyHolder):
allow_none=True) allow_none=True)
updatevm = qubes.VMProperty('updatevm', load_stage=3, updatevm = qubes.VMProperty('updatevm', load_stage=3,
default=None, allow_none=True, default=None, allow_none=True,
doc="""Which VM to use as `yum` proxy for doc="""Which VM to use as `yum` proxy for
updating AdminVM and TemplateVMs""") updating AdminVM and TemplateVMs""")
clockvm = qubes.VMProperty('clockvm', load_stage=3, clockvm = qubes.VMProperty('clockvm', load_stage=3,
default=None, allow_none=True, default=None, allow_none=True,
@ -787,15 +787,15 @@ class Qubes(qubes.PropertyHolder):
load_stage=3, load_stage=3,
default=60, default=60,
type=int, type=int,
doc="""Default time in seconds doc="""Default time in seconds
after which qrexec connection after which qrexec connection
attempt is deemed failed""") attempt is deemed failed""")
default_shutdown_timeout = qubes.property('default_shutdown_timeout', default_shutdown_timeout = qubes.property('default_shutdown_timeout',
load_stage=3, load_stage=3,
default=60, default=60,
type=int, type=int,
doc="""Default time in seconds doc="""Default time in seconds
for VM shutdown to complete""") for VM shutdown to complete""")
stats_interval = qubes.property('stats_interval', stats_interval = qubes.property('stats_interval',

View File

@ -36,6 +36,8 @@ class GUI(qubes.ext.Extension):
@qubes.ext.handler('property-set:guivm') @qubes.ext.handler('property-set:guivm')
def on_property_set(self, subject, event, name, newvalue, oldvalue=None): def on_property_set(self, subject, event, name, newvalue, oldvalue=None):
# pylint: disable=unused-argument,no-self-use
# Clean other 'guivm-XXX' tags. # Clean other 'guivm-XXX' tags.
# gui-daemon can connect to only one domain # gui-daemon can connect to only one domain
tags_list = list(subject.tags) tags_list = list(subject.tags)

View File

@ -2041,8 +2041,8 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
return 0 return 0
# this does not work, because libvirt # this does not work, because libvirt
# return self.libvirt_domain.getCPUStats( # return self.libvirt_domain.getCPUStats(
# libvirt.VIR_NODE_CPU_STATS_ALL_CPUS, 0)[0]['cpu_time']/10**9 # libvirt.VIR_NODE_CPU_STATS_ALL_CPUS, 0)[0]['cpu_time']/10**9
return self.libvirt_domain.info()[4] return self.libvirt_domain.info()[4]