Fixes to support Python 2.6 again. by andy-maier · Pull Request #541 · gitpython-developers/GitPython
## CREATE_NEW_PROCESS_GROUP is needed to allow killing it afterwards, # seehttps://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal # see https://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP if is_win if is_win and sys.version_info >= (2, 7) else 0)
# can be that nothing really exists anymore ... if os is None or os.kill is None: if os is None or getattr(os, 'kill', None) is None: return
# try to kill it
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you replace it with this more pythonic and quicker to follow (in debug-mode also) code?
_kwargs = dict(k, v) for k, v in kwargs.items() if k in execute_kwargs) kwargs = dict((k, v) for k, v in kwargs.items() if k not in execute_kwargs)
insert_after_this_arg = kwargs.pop('insert_kwargs_after', None)