Skip to content

Instantly share code, notes, and snippets.

@jbd
Created June 21, 2018 09:48
Show Gist options
  • Save jbd/4db3e4c4b2eb74c466b9fc2585b1afa2 to your computer and use it in GitHub Desktop.
Save jbd/4db3e4c4b2eb74c466b9fc2585b1afa2 to your computer and use it in GitHub Desktop.
urllib2.URLError on CentOS 6.9
#!/usr/bin/env python
# generates urllib2.URLError: <urlopen error [Errno 1] _ssl.c:492: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure>
# on CentOS 6.9 with python 2.6.6
import urllib2
url = "https://www.open-mpi.org/software/hwloc/v1.6/downloads/hwloc-1.6.2.tar.gz"
url_req = urllib2.Request(url, headers={'User-Agent': 'EasyBuild', "Accept" : "*/*"})
urllib2.urlopen(url_req)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment