From e1d3492ccc4c3b7110f425b9b110278cb1cfad82 Mon Sep 17 00:00:00 2001
From: Nico Vermaas <vermaas@astron.nl>
Date: Thu, 18 Mar 2021 11:37:22 +0100
Subject: [PATCH] troubleshooting

---
 atdb/taskdatabase/services/algorithms.py | 36 +++++++++++-------------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py
index c822d3ca..c1685b23 100644
--- a/atdb/taskdatabase/services/algorithms.py
+++ b/atdb/taskdatabase/services/algorithms.py
@@ -39,25 +39,23 @@ def get_size(status_list):
 def convert_logentries_to_html(log_entries):
     results = ""
 
-    try:
-        results += "<th>service</th><th>status</th><th>timestamp</th><th>cpu_cycles</th><th>wall_clock_time</th><th>logfile</th>"
-        results += "<tbody>"
-        for log in log_entries:
-            line = "<tr><td><b>" + log.step_name + '</b></td>'
-            line +='<td class="' + log.status + '" >' + log.status + "</td>"
-            line += "<td>" + str(log.timestamp.strftime("%m-%d-%Y, %H:%M:%S")) + "</td>"
-            line += "<td>" + str(log.cpu_cycles) + "</td>"
-            line += "<td>" + str(log.wall_clock_time) + "</td>"
-            if log.url_to_log_file!=None:
-                link = "<a href=" + '"' + str(log.url_to_log_file) + '" target="_blank">' + "logfile" + "</a>"
-            else:
-                link = "-"
-            line += "<td>" + link + "</td>"
-            results += line
-
-        results += "</tbody>"
-    except:
-        results = "<tr><td>no data</td></tr>"
+    results += "<th>service</th><th>status</th><th>timestamp</th><th>cpu_cycles</th><th>wall_clock_time</th><th>logfile</th>"
+    results += "<tbody>"
+    for log in log_entries:
+        line = "<tr><td><b>" + log.step_name + '</b></td>'
+        line +='<td class="' + log.status + '" >' + log.status + "</td>"
+        line += "<td>" + str(log.timestamp.strftime("%m-%d-%Y, %H:%M:%S")) + "</td>"
+        line += "<td>" + str(log.cpu_cycles) + "</td>"
+        line += "<td>" + str(log.wall_clock_time) + "</td>"
+        if log.url_to_log_file!=None:
+            link = "<a href=" + '"' + str(log.url_to_log_file) + '" target="_blank">' + "logfile" + "</a>"
+        else:
+            link = "-"
+        line += "<td>" + link + "</td>"
+        results += line
+
+    results += "</tbody>"
+
 
     return results
 
-- 
GitLab