Package gbp :: Module command_wrappers :: Class RunAtCommand
[hide private]
[frames] | no frames]

Class RunAtCommand

object --+    
         |    
   Command --+
             |
            RunAtCommand
Known Subclasses:

Run a command in a specific directory

Instance Methods [hide private]
 
__call__(self, dir='.', *args)
Run the command and raise exception on errors

Inherited from Command: __init__, call

Inherited from Command (private): _format_err, _log_err, _reset_state

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, dir='.', *args)
(Call operator)

 

Run the command and raise exception on errors

If run quietly it will not print an error message via the gbp.log logging API.

Wether the command prints anything to stdout/stderr depends on the capture_stderr, capture_stdout instance variables.

All errors will be reported as subclass of the CommandExecFailed exception including a non zero exit status of the run command.

Parameters:
  • args - additional command line arguments
  • quiet - don't log failed execution to stderr. Mostly useful during unit testing
Overrides: Command.__call__
(inherited documentation)