Skip to content

Commit

Permalink
Raise ProgrammingError on -inf (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
methane authored Sep 20, 2022
1 parent d288d3e commit 8f0cbac
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 8f0cbac

Please sign in to comment.