Modify ↓
#10899 closed defect (duplicate)
GitPlugin: PyGIT.get_historian() fails with OSError: [Errno 3]
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | plugin/git | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
In the code:
p[0].stdout.close()
p[0].terminate()
p[0].wait()
The terminate is dying with OSError.
Attachments (0)
Change History (3)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
-
tracext/git/PyGIT.py
diff --git a/tracext/git/PyGIT.py b/tracext/git/PyGIT.py index 8e8f7d3..02bad05 100644
a b class Storage(object): 755 755 return gen.next() 756 756 yield historian 757 757 758 if p :758 if p[0].poll() is None: 759 759 p[0].stdout.close() 760 if p[0].poll() is None: 760 761 p[0].terminate() 761 762 p[0].wait()
Note:
See TracTickets
for help on using tickets.



The problem seems to be if you have a version of Git for which closing stdout exits the process.
The solution is:
if p[0].poll() is None: p[0].stdout.close() if p[0].poll() is None: p[0].terminate() p[0].wait()