summaryrefslogtreecommitdiff
path: root/M2Crypto
diff options
context:
space:
mode:
authorHeikki Toivonen <heikki@heikkitoivonen.net>2008-06-11 22:36:48 +0000
committerHeikki Toivonen <heikki@heikkitoivonen.net>2008-06-11 22:36:48 +0000
commitd537df17219a1a47c6def7398530472148bf9356 (patch)
treee4864dc669d9c1ffb44f16b1cb533271d6637330 /M2Crypto
parent2250dfa44fdcb3d04dd7cb7f3659eeea9583dbda (diff)
downloadm2crypto-d537df17219a1a47c6def7398530472148bf9356.tar.gz
Change size() to struct_size() clarify the meaning.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@606 2715db39-9adf-0310-9c64-84f055769b4b
Diffstat (limited to 'M2Crypto')
-rw-r--r--M2Crypto/SSL/Connection.py4
-rw-r--r--M2Crypto/SSL/timeout.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/M2Crypto/SSL/Connection.py b/M2Crypto/SSL/Connection.py
index e9410d1..9d700be 100644
--- a/M2Crypto/SSL/Connection.py
+++ b/M2Crypto/SSL/Connection.py
@@ -325,10 +325,10 @@ class Connection:
return m2.ssl_get_default_session_timeout(self.ssl)
def get_socket_read_timeout(self):
- return timeout.struct_to_timeout(self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, timeout.size()))
+ return timeout.struct_to_timeout(self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, timeout.struct_size()))
def get_socket_write_timeout(self):
- return timeout.struct_to_timeout(self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_SNDTIMEO, timeout.size()))
+ return timeout.struct_to_timeout(self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_SNDTIMEO, timeout.struct_size()))
def set_socket_read_timeout(self, timeo):
assert isinstance(timeo, timeout.timeout)
diff --git a/M2Crypto/SSL/timeout.py b/M2Crypto/SSL/timeout.py
index b181f07..8f26293 100644
--- a/M2Crypto/SSL/timeout.py
+++ b/M2Crypto/SSL/timeout.py
@@ -21,5 +21,5 @@ def struct_to_timeout(binstr):
(s, ms) = struct.unpack('ll', binstr)
return timeout(s, ms)
-def size():
+def struct_size():
return struct.calcsize('ll')