BIND 10 trac1452b, updated. 6c8cde4eb79b1aa8d5b924bcddd17e4219cea67d [1452b] added some more comments abot what happens if the given param for receiver constructor doesn't have fileno

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Dec 20 17:44:23 UTC 2011


The branch, trac1452b has been updated
       via  6c8cde4eb79b1aa8d5b924bcddd17e4219cea67d (commit)
      from  35a74de7bc1ccc9336d697b30f80a8b91c68553e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6c8cde4eb79b1aa8d5b924bcddd17e4219cea67d
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Tue Dec 20 09:43:42 2011 -0800

    [1452b] added some more comments abot what happens if the given param
    for receiver constructor doesn't have fileno

-----------------------------------------------------------------------

Summary of changes:
 .../isc/util/io/socketsessionreceiver_python.cc    |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/util/io/socketsessionreceiver_python.cc b/src/lib/python/isc/util/io/socketsessionreceiver_python.cc
index 29f9e13..9ec81b8 100644
--- a/src/lib/python/isc/util/io/socketsessionreceiver_python.cc
+++ b/src/lib/python/isc/util/io/socketsessionreceiver_python.cc
@@ -64,6 +64,11 @@ SocketSessionReceiver_init(PyObject* po_self, PyObject* args, PyObject*) {
         // The constructor expects a Python socket object.  We'll extract
         // the underlying file descriptor using the fileno method (in the
         // duck typing manner) and pass it to the C++ constructor.
+        // PyObject_CallMethod() could return NULL (especially if the given
+        // object is of the wrong type and doesn't have the "fileno" method),
+        // in which case PyObjectContainer will detect it and throw
+        // PyCPPWrapperException, which will be converted to the Python
+        // TypeError below.
         PyObject* po_sock;
         if (PyArg_ParseTuple(args, "O", &po_sock)) {
             PyObjectContainer fd_container(PyObject_CallMethod(




More information about the bind10-changes mailing list