From 84865c893e1c089eefed69aeb0300afa7419d500 Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Fri, 11 Mar 2016 17:24:26 +0100 Subject: [PATCH] Retrieve authentification also for long urls from shed_auth --- lib/tool_shed/tool_shed_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tool_shed/tool_shed_registry.py b/lib/tool_shed/tool_shed_registry.py index 86eee2f1639..5b26bf62395 100644 --- a/lib/tool_shed/tool_shed_registry.py +++ b/lib/tool_shed/tool_shed_registry.py @@ -49,7 +49,7 @@ class Registry( object ): url_sans_protocol = common_util.remove_protocol_from_tool_shed_url( url ) for shed_name, shed_url in self.tool_sheds.items(): shed_url_sans_protocol = common_util.remove_protocol_from_tool_shed_url( shed_url ) - if shed_url_sans_protocol.find( url_sans_protocol ) >= 0: + if url_sans_protocol.startswith( shed_url_sans_protocol ): return self.tool_sheds_auth[ shed_name ] log.debug( "Invalid url '%s' received by tool shed registry's password_manager_for_url method." % str( url ) ) return None