From 53ff8af0843942d83dff9fd5b95d1ae98e80fe27 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 16 Jul 2020 11:48:35 -0400 Subject: Refactor analysis code into a class Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- bh20simplewebuploader/main.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'bh20simplewebuploader') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 8089883..3173d60 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -479,10 +479,13 @@ def pending_table(output, items): for r in items: if r["status"] != "pending": continue - output.write("") - output.write("%s" % (r["uuid"], r["uuid"])) - output.write("%s" % Markup.escape(r["sequence_label"])) - output.write("") + try: + output.write("") + output.write("%s" % (r["uuid"], r["uuid"])) + output.write("%s" % Markup.escape(r.get("sequence_label"))) + output.write("") + except: + pass output.write( """ @@ -497,13 +500,16 @@ def rejected_table(output, items): Errors """) for r in items: - if r["status"] != "rejected": - continue - output.write("") - output.write("%s" % (r["uuid"], r["uuid"])) - output.write("%s" % Markup.escape(r["sequence_label"])) - output.write("
%s
" % Markup.escape("\n".join(r.get("errors", [])))) - output.write("") + try: + if r["status"] != "rejected": + continue + output.write("") + output.write("%s" % (r["uuid"], r["uuid"])) + output.write("%s" % Markup.escape(r.get("sequence_label"))) + output.write("
%s
" % Markup.escape("\n".join(r.get("errors", [])))) + output.write("") + except: + pass output.write( """ -- cgit v1.2.3