diff options
| author | black <[email protected]> | 2019-04-30 12:02:28 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-04-30 12:02:28 +0300 |
| commit | e7d956ca18c72f52dd6c5f5c2e606d287d025723 (patch) | |
| tree | 875db0b2abb17478d7acdfd846539060112346af | |
| parent | Merge branch 'master' of github.com:dylanaraps/pywal (diff) | |
| parent | fixed pidof on mac os (diff) | |
| download | pywal-e7d956ca18c72f52dd6c5f5c2e606d287d025723.tar.xz pywal-e7d956ca18c72f52dd6c5f5c2e606d287d025723.zip | |
Merge pull request #406 from WillEccles/pidof-mac-fix
Fixed pidof invalid argument on Mac OS
| -rw-r--r-- | pywal/util.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pywal/util.py b/pywal/util.py index a158da9..e4b146a 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -8,6 +8,7 @@ import os import shutil import subprocess import sys +import platform class Color: @@ -183,7 +184,11 @@ def get_pid(name): return False try: - subprocess.check_output(["pidof", "-s", name]) + if platform.system() != 'Darwin': + subprocess.check_output(["pidof", "-s", name]) + else: + subprocess.check_output(["pidof", name]) + except subprocess.CalledProcessError: return False |