5562: Use static method. Fixes "TypeError: _socket_open() takes exactly 5 arguments... 5562-pycurl
authorTom Clegg <tom@curoverse.com>
Thu, 30 Apr 2015 15:16:47 +0000 (11:16 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 30 Apr 2015 15:16:47 +0000 (11:16 -0400)
sdk/python/arvados/keep.py

index 5caa5721dd77eb7790a103f18b0bdbf55d2e7e1d..5406f33bf0538edb266e503b2f7ba0fbb0de5e32 100644 (file)
@@ -340,7 +340,8 @@ class KeepClient(object):
             except:
                 ua.close()
 
-        def _socket_open(self, family, socktype, protocol, address):
+        @staticmethod
+        def _socket_open(family, socktype, protocol, address):
             """Because pycurl doesn't have CURLOPT_TCP_KEEPALIVE"""
             s = socket.socket(family, socktype, protocol)
             s.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)