From 3bcf7337732ab8c57544c32c1e3b09068b4d52fd Mon Sep 17 00:00:00 2001 From: Kyle Ellrott Date: Fri, 30 Nov 2012 15:32:47 -0800 Subject: [PATCH] Adding handler for httpexceptions.HTTPFound, so that the redirect tool will work (rather then causing an error) --- lib/galaxy/tools/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 3f0a0238587..ec67521ff11 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -36,6 +36,8 @@ from galaxy.util.shed_util import * from galaxy.util.shed_util_common import * from galaxy.web import url_for +from paste import httpexceptions + from galaxy.visualization.genome.visual_analytics import TracksterConfig log = logging.getLogger( __name__ ) @@ -1790,6 +1792,9 @@ class Tool: elif state.page == self.last_page: try: _, out_data = self.execute( trans, incoming=params, history=history ) + except httpexceptions.HTTPFound, e: + #if it's a paste redirect exception, pass it up the stack + raise e except Exception, e: log.exception('Exception caught while attempting tool execution:') return 'message.mako', dict( status='error', message='Error executing tool: %s' % str(e), refresh_frames=[] )