From 594b26d86dffca2ef88182451198b6da54990b98 Mon Sep 17 00:00:00 2001 From: NotMyLyfe <30644833+NotMyLyfe@users.noreply.github.com> Date: Fri, 3 Jul 2020 14:17:19 -0400 Subject: [PATCH] Fixed api.windows to check if 'name' doesn't exist --- api/windows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/windows.py b/api/windows.py index 1101239..984dfc1 100644 --- a/api/windows.py +++ b/api/windows.py @@ -26,7 +26,7 @@ def get_process_info(): process_name = element['processName'] for process in psutil.process_iter(): process_info = process.as_dict(attrs=['pid', 'name']) - if process_info['name'].lower() in process_name: + if process_info.get('name') and process_info.get('name').lower() in process_name: element['pid'] = process_info['pid'] return element