Mercurial > libervia-backend
changeset 2193:33b82250eadd
jp (base): raise InternalError if output is used when use_output is not declared
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 13 Mar 2017 23:14:00 +0100 (2017-03-13) |
parents | 577e19724744 |
children | 322948499db0 |
files | frontends/src/jp/base.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/jp/base.py Mon Mar 13 23:12:57 2017 +0100 +++ b/frontends/src/jp/base.py Mon Mar 13 23:14:00 2017 +0100 @@ -753,7 +753,11 @@ 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