Mercurial > libervia-backend
comparison frontends/src/jp/base.py @ 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 |
parents | a25a256688e2 |
children | 1010054cf771 |
comparison
equal
deleted
inserted
replaced
2192:577e19724744 | 2193:33b82250eadd |
---|---|
751 | 751 |
752 def disp(self, msg, verbosity=0, error=False): | 752 def disp(self, msg, verbosity=0, error=False): |
753 return self.host.disp(msg, verbosity, error) | 753 return self.host.disp(msg, verbosity, error) |
754 | 754 |
755 def output(self, data): | 755 def output(self, data): |
756 return self.host.output(self._output_type, self.args.output, self.extra_outputs, data) | 756 try: |
757 output_type = self._output_type | |
758 except AttributeError: | |
759 raise exceptions.InternalError(_(u'trying to use output when use_output has not been set')) | |
760 return self.host.output(output_type, self.args.output, self.extra_outputs, data) | |
757 | 761 |
758 def errback(self, failure_): | 762 def errback(self, failure_): |
759 """generic callback for errbacks | 763 """generic callback for errbacks |
760 | 764 |
761 display failure_ then quit with generic error | 765 display failure_ then quit with generic error |