fixed pidof on mac os

This commit is contained in:
Will Eccles 2019-04-04 16:32:50 -04:00
parent c823e3c9db
commit efa7c86ec5

View File

@ -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