diff options
author | Marko Kreen | 2010-11-10 12:32:46 +0000 |
---|---|---|
committer | Marko Kreen | 2010-11-10 12:32:46 +0000 |
commit | a528c3e57bbc0ec7a6c27dc8337416aa4bf138c8 (patch) | |
tree | a359d4695e35589dbf4f9fb523db746669bc8229 | |
parent | 21f94957b356339a488b5c9bef53a60b3b3b69c5 (diff) |
set_tcp_keepalive: check socket.fromfd(), its missing on win32
-rw-r--r-- | python/skytools/psycopgwrapper.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/skytools/psycopgwrapper.py b/python/skytools/psycopgwrapper.py index cdb70b69..64c37dc3 100644 --- a/python/skytools/psycopgwrapper.py +++ b/python/skytools/psycopgwrapper.py @@ -120,7 +120,7 @@ def set_tcp_keepalive(fd, keepalive = True, """ # usable on this OS? - if not hasattr(socket, 'SO_KEEPALIVE'): + if not hasattr(socket, 'SO_KEEPALIVE') or not hasattr(socket, 'fromfd'): return # get numeric fd and cast to socket |