Wraps a shell command, so we don't have to store any kind of command
line options in one of the git-buildpackage commands
|
|
__call(self,
args)
wraps subprocess.call so we can be verbose and fix python's SIGPIPE
handling |
|
|
|
|
__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): ... |
|
|
|
|
__init__(self,
cmd,
args=[],
shell=False,
extra_env=None,
cwd=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
|
__run(self,
args)
run self.cmd adding args as additional arguments |
|
|
|
|
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__
|