MCPcopy Index your code
hub / github.com/ekalinin/nodeenv / urlopen

Function urlopen

nodeenv.py:642–652  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

640
641
642def urlopen(url):
643 home_url = "https://github.com/ekalinin/nodeenv/"
644 headers = {'User-Agent': 'nodeenv/%s (%s)' % (nodeenv_version, home_url)}
645 req = urllib2.Request(url, None, headers)
646 if ignore_ssl_certs:
647 # py27: protocol required, py3: optional
648 # https://github.com/ekalinin/nodeenv/issues/296
649 context = ssl.SSLContext(ssl.PROTOCOL_TLS)
650 context.verify_mode = ssl.CERT_NONE
651 return urllib2.urlopen(req, context=context)
652 return urllib2.urlopen(req)
653
654# ---------------------------------------------------------
655# Virtual environment functions

Callers 3

_download_node_fileFunction · 0.85
install_npm_winFunction · 0.85
_get_versions_jsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected