Use subprocess's timeout feature instead of reinventing the wheel · gitpython-developers/GitPython@07362e7 · GitHub
Skip to content

Commit 07362e7

Browse files
committed
Use subprocess's timeout feature instead of reinventing the wheel
subprocess's APIs in 3.3+ support passing timeout to calls, such as .communicate(..), .wait(..), etc. Pass `kill_after_timeout` to those APIs and remove the watchdog handler code as it's not needed once `timeout=` is used. This enables `kill_after_timeout` on Windows platforms by side-effect as upstream implements `timeout` for all supported platforms. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
1 parent da54523 commit 07362e7

2 files changed

Lines changed: 36 additions & 87 deletions

File tree

git/cmd.py

Lines changed: 29 additions & 82 deletions

git/remote.py

Lines changed: 7 additions & 5 deletions

0 commit comments

Comments
 (0)