mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-20 09:37:42 +02:00
Merge pull request #406 from WillEccles/pidof-mac-fix
Fixed pidof invalid argument on Mac OS
This commit is contained in:
commit
e7d956ca18
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user