News for hackers. Stuff that matters.
Re:Postmodern Error Handling in Python 3.6 by nitely on Saturday February 25, 2017 @05:03AM (#13730898)
Kennethreitz requests lib? Just use requests.exceptions.RequestException, that should handle every error, if not then report it.

For python urllib IOError and OSError should suffice. At least in py3.

Re:Postmodern Error Handling in Python 3.6 by jwilk on Saturday February 25, 2017 @07:02AM (#13731221)

  import urllib.request
  try:
      urllib.request.urlopen('https://wrong.host.badssl.com/')
  except (IOError, OSError):
      pass
causes:

  ssl.CertificateError: hostname 'wrong.host.badssl.com' doesn't match either of '*.badssl.com', 'badssl.com'
Re:Postmodern Error Handling in Python 3.6 by multipass on Saturday February 25, 2017 @06:08AM (#13731046)
and in Python >=3.3, IOError is an alias for OSError.