Make pylint happy
This commit is contained in:
parent
4743558a68
commit
0b9829bc77
1 changed files with 9 additions and 9 deletions
|
@ -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)))
|
||||
|
|
Loading…
Reference in a new issue