From f19cf652cb7b9363fb74eada932aa0a059f98d08 Mon Sep 17 00:00:00 2001 From: mw Date: Thu, 5 Sep 2019 21:08:05 +0200 Subject: [PATCH] Try to make codeclimate happy --- bumblebee/modules/caffeine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bumblebee/modules/caffeine.py b/bumblebee/modules/caffeine.py index a90a7d7..1f39a9e 100644 --- a/bumblebee/modules/caffeine.py +++ b/bumblebee/modules/caffeine.py @@ -69,8 +69,9 @@ class Module(bumblebee.engine.Module): def _resume_screensaver(self): pids = [] success = True + xprop_path = bumblebee.util.which('xprop') for process in psutil.process_iter(): - if process.cmdline() == [bumblebee.util.which('xprop'), '-id', str(self._xid), '-spy']: + if process.cmdline() == [xprop_path, '-id', str(self._xid), '-spy']: pids.append(process.pid) for pid in pids: try: