From b6c9073322af031586f180fb507d88cdacc1b42c Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 13 Mar 2017 23:14:00 +0100 Subject: [PATCH] jp (base): raise InternalError if output is used when use_output is not declared --- frontends/src/jp/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontends/src/jp/base.py b/frontends/src/jp/base.py index c3b05a95..d638ddf4 100644 --- a/frontends/src/jp/base.py +++ b/frontends/src/jp/base.py @@ -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