BIND 10 trac2737, updated. d3a0ac2204c90e1bb6b3ccb474f7224f1154a0db [2737] Few more occurrences

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Mar 25 12:46:50 UTC 2013


The branch, trac2737 has been updated
       via  d3a0ac2204c90e1bb6b3ccb474f7224f1154a0db (commit)
      from  2118111e02bb90ffc92e14d37681acf3c5f52b98 (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 d3a0ac2204c90e1bb6b3ccb474f7224f1154a0db
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Mon Mar 25 09:25:26 2013 +0100

    [2737] Few more occurrences
    
    Few more occurrences of the magic keywords scattered through the code
    replaced by constants.

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

Summary of changes:
 src/bin/cmdctl/cmdctl.py.in            |    4 +++-
 src/lib/python/isc/config/ccsession.py |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/cmdctl/cmdctl.py.in b/src/bin/cmdctl/cmdctl.py.in
index bca0cd9..219dc53 100755
--- a/src/bin/cmdctl/cmdctl.py.in
+++ b/src/bin/cmdctl/cmdctl.py.in
@@ -42,6 +42,7 @@ import random
 import time
 import signal
 from isc.config import ccsession
+import isc.cc.proto_defs
 import isc.util.process
 import isc.net.parse
 from optparse import OptionParser, OptionValueError
@@ -459,7 +460,8 @@ class CommandControl():
                     else:
                         return rcode, {}
                 else:
-                    errstr = str(answer['result'][1])
+                    errstr = \
+                        str(answer[isc.cc.proto_defs.CC_PAYLOAD_RESULT][1])
             except ccsession.ModuleCCSessionError as mcse:
                 errstr = str("Error in ccsession answer:") + str(mcse)
 
diff --git a/src/lib/python/isc/config/ccsession.py b/src/lib/python/isc/config/ccsession.py
index 6687b5f..c6d9791 100644
--- a/src/lib/python/isc/config/ccsession.py
+++ b/src/lib/python/isc/config/ccsession.py
@@ -82,7 +82,7 @@ def parse_answer(msg):
        containing an error message"""
     if type(msg) != dict:
         raise ModuleCCSessionError("Answer message is not a dict: " + str(msg))
-    if 'result' not in msg:
+    if CC_PAYLOAD_RESULT not in msg:
         raise ModuleCCSessionError("answer message does not contain 'result' element")
     elif type(msg[CC_PAYLOAD_RESULT]) != list:
         raise ModuleCCSessionError("wrong result type in answer message")



More information about the bind10-changes mailing list