git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Using git from Python

From
Eric Hanchrow <offby1@blarg.net>
Date
May 8, 2008, 03:54 UTC
Message-ID
<87lk2l4fj5.fsf@offby1.atm01.sea.blarg.net>
In-Reply-To
<alpine.DEB.1.10.0805071612510.26718@sf.creativecommons.org>
>>>>> "Asheesh" == Asheesh Laroia <asheesh@asheesh.org> writes:
    Asheesh> On #git, I was advised to simply call the git command
    Asheesh> suite.  
That's what I'd do ...  (I wonder if it was me who so advised you :-)
    Asheesh> That's fine ... but since I figured others may have done
    Asheesh> this also
As far as I can tell, there is exactly no downside to simply forking a
subprocess.  Why are you trying to avoid that?
                      
    Asheesh> raises Exceptions when the git commands fail for some
    Asheesh> reason.

If Popen doesn't already raise an exception when the child process fails, then it's surely a simple matter to check the exit code, and raise the exception yourself.

-- 
I write [from 5 AM to 7 AM] to discover what I think.  After
all, the bars aren't open that early.
        -- Daniel Boorstin, former Librarian of Congress
Previous: Asheesh LaroiaNext: David Aguilar
Message 2 of 7 in “Using git from Python”
  1. Asheesh LaroiaMay 8, 2008
  2. Eric HanchrowMay 8, 2008
  3. David AguilarMay 8, 2008
  4. DillMay 10, 2008
  5. Asheesh LaroiaMay 12, 2008
  6. Steve FrécinauxMay 13, 2008
  7. Steve FrécinauxMay 14, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.