Issue 4788: two bare "except" clauses are used in the ssl module (original) (raw)
Issue4788
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.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/49038
classification
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 |
process
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.
Files | |||
---|---|---|---|
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) * ![]() |
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 module. | ||
msg78577 - (view) | Author: STINNER Victor (vstinner) * ![]() |
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) * ![]() |
Date: 2008-12-31 03:43 |
Fixed in r68089 and r68091. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:43 | admin | set | github: 49038 |
2008-12-31 03:43:40 | benjamin.peterson | set | status: open -> closedresolution: fixedmessages: + nosy: + benjamin.peterson |
2008-12-31 00:15:03 | vstinner | set | nosy: + vstinnermessages: + |
2008-12-31 00:12:42 | giampaolo.rodola | set | nosy: + janssen |
2008-12-31 00:12:24 | giampaolo.rodola | set | files: + ssl-py3k.patch |
2008-12-31 00:12:16 | giampaolo.rodola | create |
Supported by The Python Software Foundation,
Powered by Roundup
Copyright © 1990-2022, Python Software Foundation
Legal Statements