From f88dca706fd5470d18a8a17c5733e62681dc7f86 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 2 Feb 2019 21:07:28 +0200 Subject: [PATCH] reload: Fix error if pidof not installed --- pywal/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pywal/util.py b/pywal/util.py index de8eb09..a158da9 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -5,6 +5,7 @@ import colorsys import json import logging import os +import shutil import subprocess import sys @@ -178,6 +179,9 @@ def disown(cmd): def get_pid(name): """Check if process is running by name.""" + if not shutil.which("pidof"): + return False + try: subprocess.check_output(["pidof", "-s", name]) except subprocess.CalledProcessError: