Make pylint happy

This commit is contained in:
mw 2019-09-02 16:42:25 +02:00
parent 4743558a68
commit 0b9829bc77

View file

@ -29,7 +29,7 @@ class Module(bumblebee.engine.Module):
)
def _check_requirements(self):
requirements = ['xdotool','xprop','xdg-screensaver']
requirements = ['xdotool', 'xprop', 'xdg-screensaver']
missing = []
for tool in requirements:
if not bumblebee.util.which(tool):
@ -63,20 +63,20 @@ class Module(bumblebee.engine.Module):
bumblebee.util.execute("xdg-screensaver suspend {}".format(self._xid))
os._exit(0)
else:
os.waitpid(pid,0)
os.waitpid(pid, 0)
def _resume_screensaver(self):
for process in psutil.process_iter():
if process.cmdline() == [bumblebee.util.which('xprop'),'-id',str(self._xid),'-spy']:
if process.cmdline() == [bumblebee.util.which('xprop'), '-id', str(self._xid), '-spy']:
pid = process.pid
os.kill(pid,9)
os.kill(pid, 9)
def state(self, widget):
def state(self, _):
if self._active:
return "activated"
return "deactivated"
def _toggle(self, event):
def _toggle(self, _):
missing = self._check_requirements()
if missing:
logging.warning("Could not run caffeine - missing {}!".format(", ".join(missing)))