BIND 10 master, updated. 412e1fc061aa852fad8053bf04d8cf0ce878e42d [trac2116/master] don't set pyerr string in Name.split() on success.

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Jul 17 20:24:24 UTC 2012


The branch, master has been updated
       via  412e1fc061aa852fad8053bf04d8cf0ce878e42d (commit)
      from  712637513505f7afb8434292ca2a98c3517dffd3 (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 412e1fc061aa852fad8053bf04d8cf0ce878e42d
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Tue Jul 17 13:23:15 2012 -0700

    [trac2116/master] don't set pyerr string in Name.split() on success.

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

Summary of changes:
 src/lib/dns/python/name_python.cc |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/python/name_python.cc b/src/lib/dns/python/name_python.cc
index 277595a..2799db9 100644
--- a/src/lib/dns/python/name_python.cc
+++ b/src/lib/dns/python/name_python.cc
@@ -386,7 +386,7 @@ Name_split(s_Name* self, PyObject* args) {
             ret->cppobj = NULL;
             try {
                 ret->cppobj = new Name(self->cppobj->split(first, n));
-            } catch(const isc::OutOfRange& oor) {
+            } catch (const isc::OutOfRange& oor) {
                 PyErr_SetString(PyExc_IndexError, oor.what());
                 ret->cppobj = NULL;
             }
@@ -408,7 +408,7 @@ Name_split(s_Name* self, PyObject* args) {
             ret->cppobj = NULL;
             try {
                 ret->cppobj = new Name(self->cppobj->split(n));
-            } catch(const isc::OutOfRange& oor) {
+            } catch (const isc::OutOfRange& oor) {
                 PyErr_SetString(PyExc_IndexError, oor.what());
                 ret->cppobj = NULL;
             }
@@ -417,11 +417,10 @@ Name_split(s_Name* self, PyObject* args) {
                 return (NULL);
             }
         }
+    } else {
+        PyErr_Clear();
+        PyErr_SetString(PyExc_TypeError, "No valid type in split argument");
     }
-
-    PyErr_Clear();
-    PyErr_SetString(PyExc_TypeError,
-                    "No valid type in split argument");
     return (ret);
 }
 



More information about the bind10-changes mailing list