parameters: (self, buf, operation, rr)
docstring: Helper method for __data_common().
          Add the given rr to the given buffer, but with a SOA check;
          - if the buffer is empty, the RRType of the rr must be SOA
          - if the buffer is not empty, the RRType must not be SOA
          Raises a ValueError if these rules are not satisified.
          If they are, the RR is appended to the buffer.
          Arguments:
          buf: buffer to add to
          operation: operation to perform (either 'add' or 'delete')
          rr: RRset to add to the buffer
docstring_summary: Helper method for __data_common().
          Add the given rr to the given buffer, but with a SOA check;
          - if the buffer is empty, the RRType of the rr must be SOA
          - if the buffer is not empty, the RRType must not be SOA
          Raises a ValueError if these rules are not satisified.
          If they are, the RR is appended to the buffer.
          Arguments:
          buf: buffer to add to
          operation: operation to perform (either 'add' or 'delete')
          rr: RRset to add to the buffer
docstring_tokens: Helper method for __data_common () . Add the given rr to the given buffer but with a SOA check ; - if the buffer is empty the RRType of the rr must be SOA - if the buffer is not empty the RRType must not be SOA Raises a ValueError if these rules are not satisified . If they are the RR is appended to the buffer . Arguments : buf : buffer to add to operation : operation to perform ( either add or delete ) rr : RRset to add to the buffer
function: def __append_with_soa_check(self, buf, operation, rr):
          """
          Helper method for __data_common().
          Add the given rr to the given buffer, but with a SOA check;
          - if the buffer is empty, the RRType of the rr must be SOA
          - if the buffer is not empty, the RRType must not be SOA
          Raises a ValueError if these rules are not satisified.
          If they are, the RR is appended to the buffer.
          Arguments:
          buf: buffer to add to
          operation: operation to perform (either 'add' or 'delete')
          rr: RRset to add to the buffer
          """
          # first add or delete must be of type SOA
          if len(buf) == 0 and\
             rr.get_type() != bundy.dns.RRType.SOA:
              raise ValueError("First " + operation +
                               " in single update mode must be of type SOA")
          # And later adds or deletes may not
          elif len(buf) != 0 and\
             rr.get_type() == bundy.dns.RRType.SOA:
              raise ValueError("Multiple SOA records in single " +
                               "update mode " + operation)
          buf.append((operation, rr))
function_tokens: def __append_with_soa_check ( self , buf , operation , rr ) : # first add or delete must be of type SOA if len ( buf ) == 0 and rr . get_type ( ) != bundy . dns . RRType . SOA : raise ValueError ( "First " + operation + " in single update mode must be of type SOA" ) # And later adds or deletes may not elif len ( buf ) != 0 and rr . get_type ( ) == bundy . dns . RRType . SOA : raise ValueError ( "Multiple SOA records in single " + "update mode " + operation ) buf . append ( ( operation , rr ) )