Skip to content

Commit 7e22a62

Browse files
committed
addressing @adamrp comment
1 parent 6619434 commit 7e22a62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

qiita_pet/handlers/analysis_handlers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
filepath_ids_to_rel_paths)
3232
from qiita_db.exceptions import QiitaDBUnknownIDError
3333
from qiita_db.study import Study
34+
from qiita_db.logger import LogEntry
3435

3536
SELECT_SAMPLES = 2
3637
SELECT_COMMANDS = 3
@@ -178,9 +179,12 @@ def post(self, analysis_id):
178179
analysis_name))
179180
level = "success"
180181
except Exception as e:
182+
e = str(e)
181183
msg = ("Couldn't remove <b><i>%s</i></b> analysis: %s" % (
182-
analysis_name, str(e)))
184+
analysis_name, e))
183185
level = "danger"
186+
LogEntry.create('Runtime', "Couldn't remove analysis ID %d: %s" %
187+
(analysis_id, e))
184188

185189
self.redirect(u"/analysis/show/?level=%s&message=%s" % (level, msg))
186190

0 commit comments

Comments
 (0)