From 3c315431afbbcc8346bac7539bda5b4b19821872 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 c89749ef2c5..7c56d36c30b 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -35,6 +35,8 @@ from galaxy.util import listify import galaxy.util.shed_util_common from galaxy.web import url_for +from paste import httpexceptions + from galaxy.visualization.genome.visual_analytics import TracksterConfig log = logging.getLogger( __name__ ) @@ -1801,6 +1803,9 @@ class Tool( object ): 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=[] )