Skip to content

Commit

Permalink
Merge branch 'PyMySQL:main' into unix_socket
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeantMenacingGarlic committed Oct 10, 2022
2 parents 79b7559 + e77b218 commit 4457cfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pymysql/connections.py
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
2 changes: 1 addition & 1 deletion pymysql/converters.py
Expand Up @@ -56,7 +56,7 @@ def escape_int(value, mapping=None):

def escape_float(value, mapping=None):
s = repr(value)
if s in ("inf", "nan"):
if s in ("inf", "-inf", "nan"):
raise ProgrammingError("%s can not be used with MySQL" % s)
if "e" not in s:
s += "e0"
Expand Down

0 comments on commit 4457cfc

Please sign in to comment.