diff --git a/src/scriptform.py b/src/scriptform.py index 2e225c5..fa1d1bc 100755 --- a/src/scriptform.py +++ b/src/scriptform.py @@ -962,13 +962,16 @@ class ScriptFormWebApp(WebAppHandler): log.info("Variables: {0}".format(dict(form_values.items()))) result = form_config.callback(form_name, form_values, self.wfile, self.wfile) - if result: + if form_def.output != 'raw': + # Ignore everything if we're doing raw output, since it's the + # scripts responsibility. if result['exitcode'] != 0: msg = u'{0}'.format(cgi.escape(result['stderr'].decode('utf8'))) else: if form_def.output == 'escaped': msg = u'
{0}
'.format(cgi.escape(result['stdout'].decode('utf8'))) else: + # Non-escaped output (html, usually) msg = result['stdout'].decode('utf8') output = html_submit_response.format(