Wraps a shell command, so we don't have to store any kind of command
line options in one of the git-buildpackage commands
|
__init__(self,
cmd,
args=[ ] ,
shell=False,
extra_env=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
__call(self,
args)
wraps subprocess.call so we can be verbose and fix python's SIGPIPE
handling |
|
|
|
__run(self,
args)
run self.cmd adding args as additional arguments |
|
|
|
__call__(self,
args=[ ] )
Run the command, convert all errors into CommandExecFailed, assumes
that the lower levels printed an error message - only useful if you
only expect 0 as result >>>
Command("/bin/true")(["foo", "bar"])
>>> Command("/foo/bar")() Traceback (most recent
call last): ... |
|
|
|
call(self,
args)
like __call__ but don't use stderr and let the caller handle the
return status >>>
Command("/bin/true").call(["foo",
"bar"]) 0 >>>
Command("/foo/bar").call(["foo",
"bar"]) # doctest:+ELLIPSIS Traceback (most recent call
last): ... |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|