jp (base): raise InternalError if output is used when use_output is not declared
This commit is contained in:
parent
2c6afc6d4f
commit
b6c9073322
1 changed files with 5 additions and 1 deletions
|
|
@ -753,7 +753,11 @@ class CommandBase(object):
|
|||
return self.host.disp(msg, verbosity, error)
|
||||
|
||||
def output(self, data):
|
||||
return self.host.output(self._output_type, self.args.output, self.extra_outputs, data)
|
||||
try:
|
||||
output_type = self._output_type
|
||||
except AttributeError:
|
||||
raise exceptions.InternalError(_(u'trying to use output when use_output has not been set'))
|
||||
return self.host.output(output_type, self.args.output, self.extra_outputs, data)
|
||||
|
||||
def errback(self, failure_):
|
||||
"""generic callback for errbacks
|
||||
|
|
|
|||
Loading…
Reference in a new issue