Commit 63f84e79 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

pubsub notifier: produce more explicit RSS

parent eab0d1fd
......@@ -37,18 +37,24 @@ def main():
stderr=subprocess.STDOUT
)
exit_code = 0
content = ("OK</br><p>%s ran successfully</p>"
"<p>Output is: </p><pre>%s</pre>" % (
args.executable[0],
content.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
))
except subprocess.CalledProcessError as e:
content = e.output
exit_code = e.returncode
print content
content += ("\n<p>Failed with returncode <em>%d</em>.</p>"
content = ("FAILURE</br><p>%s Failed with returncode <em>%d</em>.</p>"
"<p>Output is: </p><pre>%s</pre>" % (
args.executable[0],
exit_code,
content.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
))
print content
with open(args.logfile[0], 'a') as file_:
cvsfile = csv.writer(file_)
cvsfile.writerow([
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment