From f0c766f21264ea4c1bd3143951b9f412c6d38e00 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Tue, 13 Mar 2018 20:43:33 -0400 Subject: [PATCH] Fix syntax errors in pew windows c api calls --- pipenv/patched/pew/_win_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pipenv/patched/pew/_win_utils.py b/pipenv/patched/pew/_win_utils.py index 7fbca370..8ab7a0b9 100644 --- a/pipenv/patched/pew/_win_utils.py +++ b/pipenv/patched/pew/_win_utils.py @@ -6,6 +6,7 @@ # (BSD License) - adapted from Celery # https://github.com/celery/celery/blob/2.5-archived/celery/concurrency/processes/_win.py import os +import six from ctypes import ( byref, sizeof, windll, Structure, WinError, POINTER, c_size_t, c_char, c_void_p @@ -96,7 +97,7 @@ def get_all_processes(): def _get_executable(process_dict): if hasattr(process_dict, 'keys'): executable = process_dict.get('executable') - if isinstance(executable, six.STRING_TYPES): + if isinstance(executable, six.string_types): return executable.lower().rsplit('.', 1)[0] return '' @@ -115,6 +116,6 @@ def get_shell(pid=None, max_depth=6): if lvl >= max_depth: return return check_parent(ppid, lvl=lvl+1) - if _get_executable(processes.get([pid])) in SHELL_NAMES: + if _get_executable(processes.get(pid)) in SHELL_NAMES: return processes[pid]['executable'] return check_parent(pid)