Skip to content

Commit

Permalink
Fix connection timeout error messages (#830)
Browse files Browse the repository at this point in the history
Fix inconsistency between  connection read/write timeout error messages and actual value checks.
  • Loading branch information
svolle authored and methane committed Dec 4, 2019
1 parent 0f4d45e commit c3c87a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymysql/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ def _config(key, arg):
raise ValueError("connect_timeout should be >0 and <=31536000")
self.connect_timeout = connect_timeout or None
if read_timeout is not None and read_timeout <= 0:
raise ValueError("read_timeout should be >= 0")
raise ValueError("read_timeout should be > 0")
self._read_timeout = read_timeout
if write_timeout is not None and write_timeout <= 0:
raise ValueError("write_timeout should be >= 0")
raise ValueError("write_timeout should be > 0")
self._write_timeout = write_timeout
if charset:
self.charset = charset
Expand Down

0 comments on commit c3c87a7

Please sign in to comment.