Merge pull request #763 from martenson/fix-bare-exceptions

make except catch just Exceptions, not everything
This commit is contained in:
John Chilton
2015-09-21 18:54:00 +01:00
+2 -2
View File
@@ -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 )