Skip to content

Commit

Permalink
Raise ProgrammingError on -inf
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Sep 19, 2022
1 parent f5a2f3d commit e883719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MySQLdb/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def Thing2Str(s, d):

def Float2Str(o, d):
s = repr(o)
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 e883719

Please sign in to comment.