From 56f10c9a1d7fa984aa1c286abaf4fadd26f1746a Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Mon, 21 Sep 2015 13:51:41 -0400 Subject: [PATCH] make except catch just Exceptions, not everything I am not sure when these are hapenning (error initialized with encoded id & tool without id) but this should be safe fix --- lib/galaxy/tools/errors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/tools/errors.py b/lib/galaxy/tools/errors.py index c9b8f40feb5..60313d72ed1 100644 --- a/lib/galaxy/tools/errors.py +++ b/lib/galaxy/tools/errors.py @@ -60,7 +60,7 @@ class ErrorReporter( object ): try: hda = sa_session.query( model.HistoryDatasetAssociation ).get( hda_id ) assert hda is not None, ValueError( "No HDA yet" ) - except: + except Exception: hda = sa_session.query( model.HistoryDatasetAssociation ).get( app.security.decode_id( hda_id ) ) assert isinstance( hda, model.HistoryDatasetAssociation ), ValueError( "Bad value provided for HDA (%s)." % ( hda ) ) self.hda = hda @@ -135,7 +135,7 @@ class EmailErrorReporter( ErrorReporter ): subject = "Galaxy tool error report from %s" % email try: subject = "%s (%s)" % ( subject, self.app.toolbox.get_tool( self.job.tool_id, self.job.tool_version ).old_id ) - except: + except Exception: pass # Send it return util.send_mail( frm, to, subject, self.report, self.app.config )