commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/60f203c3934d/ Changeset: 60f203c3934d User: saketkc Date: 2014-01-17 00:54:23 Summary: Add ProxyHandler to auto-detect system proxies Affected #: 1 file diff -r 41cd069aa739f735add1b7c6c4bdb5881dc7ed3b -r 60f203c3934d16f96e013102bab7882dbd0f64cd lib/tool_shed/util/common_util.py --- a/lib/tool_shed/util/common_util.py +++ b/lib/tool_shed/util/common_util.py @@ -183,7 +183,11 @@ def tool_shed_get( app, tool_shed_url, uri ): """Make contact with the tool shed via the uri provided.""" registry = app.tool_shed_registry - urlopener = urllib2.build_opener() + ## urllib2 auto-detects system proxies, when passed a Proxyhandler + ## Refer: http://docs.python.org/2/howto/urllib2.html#proxies + proxy = urllib2.ProxyHandler() + urlopener = urllib2.build_opener(proxy) + urllib2.install_opener(urlopener) password_mgr = registry.password_manager_for_url( tool_shed_url ) if password_mgr is not None: auth_handler = urllib2.HTTPBasicAuthHandler( password_mgr ) https://bitbucket.org/galaxy/galaxy-central/commits/cdd88bdbbf93/ Changeset: cdd88bdbbf93 User: greg Date: 2014-01-20 15:42:05 Summary: Merged in saketkc/galaxy-central-gsoc2013 (pull request #299) Add ProxyHandler to auto-detect system proxies Affected #: 1 file diff -r d634429a04504eb51a39315d947e4626633f2b32 -r cdd88bdbbf93ce2cec2f4b6b086c5edb7b080c8c lib/tool_shed/util/common_util.py --- a/lib/tool_shed/util/common_util.py +++ b/lib/tool_shed/util/common_util.py @@ -183,7 +183,11 @@ def tool_shed_get( app, tool_shed_url, uri ): """Make contact with the tool shed via the uri provided.""" registry = app.tool_shed_registry - urlopener = urllib2.build_opener() + ## urllib2 auto-detects system proxies, when passed a Proxyhandler + ## Refer: http://docs.python.org/2/howto/urllib2.html#proxies + proxy = urllib2.ProxyHandler() + urlopener = urllib2.build_opener(proxy) + urllib2.install_opener(urlopener) password_mgr = registry.password_manager_for_url( tool_shed_url ) if password_mgr is not None: auth_handler = urllib2.HTTPBasicAuthHandler( password_mgr ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org