Skip to content

Commit 8f114c7

Browse files
committed
Merge pull request justquick#23 from ziollek/master
proper handle timeout in connection string fix justquick#22
2 parents 18a18c4 + 7b0f534 commit 8f114c7

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
@@ -63,6 +63,10 @@ class VarnishHandler(Telnet):
6363
def __init__(self, host_port_timeout, secret=None, **kwargs):
6464
if isinstance(host_port_timeout, basestring):
6565
host_port_timeout = host_port_timeout.split(':')
66+
67+
if (len(host_port_timeout) == 3):
68+
host_port_timeout[2] = float(host_port_timeout[2])
69+
6670
Telnet.__init__(self, *host_port_timeout)
6771
(status, length), content = self._read()
6872
if status == 107 and secret is not None:

0 commit comments

Comments
 (0)