Edgewall Software
Modify

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#10899 closed defect (duplicate)

GitPlugin: PyGIT.get_historian() fails with OSError: [Errno 3]

Reported by: mresnick@… 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 anonymous, 12 years ago

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()

comment:2 by mresnick@…, 12 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):  
    755755                return gen.next()
    756756        yield historian
    757757
    758         if p:
     758        if p[0].poll() is None:
    759759            p[0].stdout.close()
     760        if p[0].poll() is None:
    760761            p[0].terminate()
    761762            p[0].wait()
Last edited 11 years ago by Christian Boos (previous) (diff)

comment:3 by Jun Omae, 11 years ago

Resolution: duplicate
Status: newclosed

duplicate of #10958.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.