(url)
| 640 | |
| 641 | |
| 642 | def 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 |
no outgoing calls
no test coverage detected