Skip to content

Commit 7b0f534

Browse files
committed
issue#22 | proper handle timeout in connection string
1 parent 8da8d05 commit 7b0f534

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

varnish.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ class VarnishHandler(Telnet):
6262
def __init__(self, host_port_timeout, secret=None, **kwargs):
6363
if isinstance(host_port_timeout, basestring):
6464
host_port_timeout = host_port_timeout.split(':')
65+
66+
if (len(host_port_timeout) == 3):
67+
host_port_timeout[2] = float(host_port_timeout[2])
68+
6569
Telnet.__init__(self, *host_port_timeout)
6670
(status, length), content = self._read()
6771
if status == 107 and secret is not None:

0 commit comments

Comments
 (0)