10000 Remove deprecated socket.error from Connection.connect exception handler by Nothing4You · Pull Request #1062 · PyMySQL/PyMySQL · GitHub
[go: up one dir, main page]

Skip to content

Remove deprecated socket.error from Connection.connect exception handler #1062

New issue

Have a question about this project? Sign up for a free GitHub account to ope 8000 n an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pymysql/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def connect(self, sock=None):
except: # noqa
pass

if isinstance(e, (OSError, IOError, socket.error)):
if isinstance(e, (OSError, IOError)):
exc = err.OperationalError(
CR.CR_CONN_HOST_ERROR,
"Can't connect to MySQL server on %r (%s)" % (self.host, e),
Expand Down
0