BIND 10 #2787: avoid hardcoding "IXFR" and "AXFR" in xfrin

BIND 10 Development do-not-reply at isc.org
Wed Feb 20 19:31:38 UTC 2013


#2787: avoid hardcoding "IXFR" and "AXFR" in xfrin
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:
  jinmei                             |                Status:  new
                       Type:         |             Milestone:  Next-Sprint-
  defect                             |  Proposed
                   Priority:         |              Keywords:
  medium                             |             Sensitive:  0
                  Component:  xfrin  |           Sub-Project:  DNS
               CVSS Scoring:         |  Estimated Difficulty:  0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
 We should now be able to avoid hardcoding like these:

 {{{#!python
             # Right now RRType.[IA]XFR().to_text() is 'TYPExxx', so we
 need
             # to hardcode here.
             req_str = 'IXFR' if request_type == RRType.IXFR else 'AXFR'
 ...
     if exception is not None:
         typestr = "AXFR" if request_type == RRType.AXFR else "IXFR"
         logger.error(XFRIN_XFR_PROCESS_FAILURE, typestr,
 zone_name.to_text(),
                      str(rrclass), str(exception))
 }}}
 (there may be more).

 This should be cleaned up; it will help improve readability.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2787>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list