Skip to content

Commit

Permalink
and not None i guess
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 26, 2024
1 parent 0774130 commit a6d9ceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WfRunStatus(Enum):
def get_comfy_process():
comfy_processes = []
process_list = list(psutil.process_iter(['pid', 'exe', 'cmdline']))
python_processes = [proc for proc in process_list if 'python' in proc.info['exe'].lower()]
python_processes = [proc for proc in process_list if proc.info['exe'] is not None and 'python' in proc.info['exe'].lower()]
for process in python_processes:
cmdline = process.info['cmdline']
if cmdline and 'main.py' in ' '.join(cmdline):
Expand Down

0 comments on commit a6d9ceb

Please sign in to comment.