Module Expr Str Import alias Import alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Str Assign NameStore AttributeLoad NameLoad attr Expr Str Assign NameStore Num ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad If NameLoad body Assign NameStore BinOpAdd Str Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body If CompareEq NameLoad NameLoad body Return If CompareEq NameLoad NameLoad body Raise Call NameLoad NameLoad NameLoad NameLoad NameLoad If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body If UnaryOpNot CompareIn NameLoad NameLoad body Raise Call NameLoad NameLoad NameLoad NameLoad NameLoad orelse If CompareNotEq NameLoad NameLoad body Raise Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body If CompareGtE NameLoad Num body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad UnaryOpUSub NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad AttributeLoad NameLoad attr body Expr Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Num keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore Str Raise Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot NameLoad body Assign NameStore Str Raise Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad If CompareLt NameLoad Num body Assign NameStore Str Raise Call NameLoad NameLoad NameLoad orelse If BoolOpOr CompareGt NameLoad Num SubscriptLoad NameLoad Index Num body Assign NameStore Str Raise Call NameLoad NameLoad NameLoad Return SubscriptLoad NameLoad Index Num decorator_list
N/A N/A 
Utility wrapper functions around Python's subprocess module.
 N/A subprocess N/A types N/A PIPE N/A subprocess PIPE N/A STDOUT N/A subprocess STDOUT N/A 
DEVNULL can be used for stdin, to indicate that stdin should be
redirected from /dev/null.

We use subprocess.STDOUT here to guarantee that we will avoid collisions
with subprocess.PIPE and any other constants defined by subprocess in the
future.
 N/A DEVNULL N/A subprocess STDOUT N/A 
ANY can be passed as the expected_rc or expected_sig argument,
to indicate that any exit code or signal should be allowed.
 N/A ANY -1 ProcError N/A Exception N/A N/A N/A CmdFailedError N/A ProcError N/A __init__ N/A N/A self args msg cmd_err N/A None N/A N/A msg N/A command %s %s N/A args msg N/A cmd_err N/A N/A indented_err N/A N/A N/A join N/A N/A cmd_err splitlines N/A msg N/A N/A msg 
stderr:
 indented_err N/A N/A N/A ProcError __init__ self msg N/A N/A self cmd args N/A N/A self stderr cmd_err N/A N/A CmdExitCodeError N/A CmdFailedError N/A __init__ N/A N/A self args exit_code expected_rc cmd_err N/A None None N/A N/A msg N/A exited with exit code %s N/A exit_code N/A N/A N/A CmdFailedError __init__ self args msg cmd_err N/A N/A self exitCode exit_code N/A N/A self expectedExitCode expected_rc N/A N/A CmdTerminatedError N/A CmdFailedError N/A __init__ N/A N/A self args signum expected_sig cmd_err N/A None None N/A N/A msg N/A was terminated by signal %s N/A signum N/A N/A N/A CmdFailedError __init__ self args msg cmd_err N/A N/A self signal signum N/A N/A self expectedSignal expected_sig N/A N/A _check_result N/A N/A args result expected cmd_err ex_class N/A N/A N/A N/A expected ANY N/A N/A N/A N/A expected None N/A N/A N/A ex_class args result expected cmd_err N/A N/A isinstance expected N/A list tuple N/A N/A N/A N/A result expected N/A N/A N/A ex_class args result expected cmd_err N/A N/A N/A result expected N/A N/A N/A ex_class args result expected cmd_err N/A check_exit_code N/A N/A args exit_code expected_rc cmd_err N/A N/A N/A N/A _check_result args exit_code expected_rc cmd_err CmdExitCodeError N/A check_signal N/A N/A args signum expected_sig cmd_err N/A N/A N/A N/A _check_result args signum expected_sig cmd_err CmdTerminatedError N/A check_status N/A N/A args status expected_rc expected_sig cmd_err N/A 0 None None N/A N/A N/A status 0 N/A N/A N/A check_exit_code args status expected_rc cmd_err N/A N/A N/A check_signal args N/A status expected_sig cmd_err N/A popen_cmd N/A N/A args cwd env stdin stdout stderr N/A None None /dev/null N/A subprocess PIPE N/A subprocess PIPE N/A N/A 
    Wrapper around subprocess.Popen() that also accepts filenames
    for stdin/stdout/stderr.
     N/A N/A isinstance stdin N/A types StringTypes N/A N/A stdin N/A file stdin r N/A N/A isinstance stdout N/A types StringTypes N/A N/A stdout N/A file stdout w N/A N/A isinstance stderr N/A types StringTypes N/A N/A stderr N/A file stderr w N/A p N/A N/A subprocess Popen args stdin stdin stdout stdout stderr stderr cwd cwd env env close_fds True N/A p N/A run_cmd N/A N/A args cwd env expected_rc expected_sig stdin stdout stderr N/A None None 0 None /dev/null N/A subprocess PIPE N/A subprocess PIPE N/A N/A 
    run_cmd(args, cwd=None, env=None, expected_rc=0, expected_sig=None) -->
                (exit_code, stdoutdata, stderrdata)

    If the process was terminated via a signal, exit_code will be a negative
    number, whose absolute value is the signal number.

    expected_rc may be ANY, None, an integer value, or a list of integer
    values.  If the command exits with an return code not in expected_rc, a
    CmdFailedError will be raised.

    expected_sig may be ANY, None, an integer value, or a list of integer
    values.  If the command is terminated with a signal not in expected_sig, a
    CmdTerminatedError will be raised.
     N/A p N/A popen_cmd args cwd cwd env env stdin stdin stdout stdout stderr stderr N/A N/A cmd_out cmd_err N/A N/A p communicate N/A status N/A N/A p wait N/A N/A check_status args status expected_rc expected_sig cmd_err N/A N/A status cmd_out cmd_err N/A run_simple_cmd N/A N/A args cwd env stdout N/A None None N/A subprocess PIPE N/A N/A 
    run_simple_cmd(args, cwd=None, env=None) --> stdoutdata

    Wrapper around run_cmd() that expects the command to exit with a return
    value of 0, and output no data on stderr.  If any of these conditions fail,
    a CmdFailedError is raised.
     N/A N/A exit_code cmd_out cmd_err N/A run_cmd args cwd cwd env env expected_rc 0 expected_sig None stdout stdout N/A cmd_err N/A N/A msg printed error message on stderr N/A N/A CmdFailedError args msg cmd_err N/A cmd_out N/A run_oneline_cmd N/A N/A args cwd env N/A None None N/A N/A 
    run_oneline_cmd(args, cwd=None, env=None) --> line

    Wrapper around run_simple_cmd() that also expects the command to print
    exactly one line (terminated with a newline) to stdout.  If the command
    does not print a single line, a CmdFailedError is raised.

    Returns the command output, with the terminating newline removed.
     N/A cmd_out N/A run_simple_cmd args cwd cwd env env N/A N/A cmd_out N/A N/A msg did not print any output N/A N/A CmdFailedError args msg N/A lines N/A N/A cmd_out split N/A num_lines N/A len lines N/A N/A num_lines 2 N/A N/A msg did not print a terminating newline N/A N/A CmdFailedError args msg N/A N/A N/A N/A num_lines 2 N/A lines N/A 1 N/A N/A msg printed more than one line of output N/A N/A CmdFailedError args msg N/A N/A lines N/A 0 N/A