BIND 10 #2967: zonemgr should use general datasource configuration, not Auth/database_file

BIND 10 Development do-not-reply at isc.org
Thu Jun 27 22:50:13 UTC 2013


#2967: zonemgr should use general datasource configuration, not Auth/database_file
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |  UnAssigned
            Priority:  medium        |                       Status:
           Component:  xfrin         |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20130709
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  4             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by pselkirk):

 Replying to [comment:11 muks]:
 > What is the reason for `d60f2832267b6371cf792c577136e6a41cf1b3d6`? It
 seems the initial author wrote the previous version of code that way on
 purpose (maybe to make it more readable).

 I can't guess the intent of the original author ("Jerry"), I can only
 judge the code that's in front of me.

 {{{
     def _zone_mgr_is_empty(self):
         """Does zone manager has no zone?"""
         if not len(self._zonemgr_refresh_info):
             return True

         return False
 }}}

 In this case, a one-line test is expanded to a function (whose result is
 tested). This is used exactly once in real code (and in a unit test, for
 completeness). So it seemed like a good candidate for inlining.

 > Also, this seems like a bad way to check the result of `len`:
 > {{{
 > if not len(self._zonemgr_refresh_info):
 > }}}

 Ironically, this is the one part of the code that I didn't change. But it
 seems that this is more pythonic:
 {{{
 if not self._zonemgr_refresh_info:
 }}}

 Commited in 753d1c0.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2967#comment:13>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list