DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
def check_call(*popenargs, **kwargs):
    try:
        from subprocess import check_call
        check_call(*popenargs, **kwargs)
    except ImportError:
        # Python 2.4 doesn't have check_call, so we reimplement it
        from subprocess import call
        def check_call(*popenargs, **kwargs):
            retcode = call(*popenargs, **kwargs)
            if retcode:
                cmd = kwargs.get("args")
                if cmd is None:
                    cmd = popenargs[0]
                raise Exception("Command '%s' returned non-zero exit status %d" % (cmd, retcode))
        check_call(*popenargs, **kwargs)