This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: two bare "except" clauses are used in the ssl module
Type: Stage:
Components: Library (Lib) Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, giampaolo.rodola, janssen, vstinner
Priority: normal Keywords: patch

Created on 2008-12-31 00:12 by giampaolo.rodola, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
ssl.patch giampaolo.rodola, 2008-12-31 00:12
ssl-py3k.patch giampaolo.rodola, 2008-12-31 00:12
Messages (3)
msg78575 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2008-12-31 00:12
From PEP-8:

> When catching exceptions, mention specific exceptions
> whenever possible instead of using a bare 'except:' clause.
> [...] 
> A bare 'except:' clause will catch SystemExit and KeyboardInterrupt
> exceptions, making it harder to interrupt a program with Control-C,
> and can disguise other problems.

The patch in attachment removes two bare "except" clauses used in ssl 
msg78577 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-12-31 00:15
socket.getpeername() can only raises an error of type socket.error, so 
the patch is valid and needed!
msg78589 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-31 03:43
Fixed in r68089 and r68091.
Date User Action Args
2022-04-11 14:56:43adminsetgithub: 49038
2008-12-31 03:43:40benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg78589
nosy: + benjamin.peterson
2008-12-31 00:15:03vstinnersetnosy: + vstinner
messages: + msg78577
2008-12-31 00:12:42giampaolo.rodolasetnosy: + janssen
2008-12-31 00:12:24giampaolo.rodolasetfiles: + ssl-py3k.patch
2008-12-31 00:12:16giampaolo.rodolacreate