Skip to content

Commit c3c87a7

Browse files
svollemethane
authored andcommitted
Fix connection timeout error messages (#830)
Fix inconsistency between connection read/write timeout error messages and actual value checks.
1 parent 0f4d45e commit c3c87a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymysql/connections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ def _config(key, arg):
267267
raise ValueError("connect_timeout should be >0 and <=31536000")
268268
self.connect_timeout = connect_timeout or None
269269
if read_timeout is not None and read_timeout <= 0:
270-
raise ValueError("read_timeout should be >= 0")
270+
raise ValueError("read_timeout should be > 0")
271271
self._read_timeout = read_timeout
272272
if write_timeout is not None and write_timeout <= 0:
273-
raise ValueError("write_timeout should be >= 0")
273+
raise ValueError("write_timeout should be > 0")
274274
self._write_timeout = write_timeout
275275
if charset:
276276
self.charset = charset

0 commit comments

Comments
 (0)