docs: def decode(self):
          "Decode self.buffer, populating instance variables and return self."
          buflen = len(self.buffer)
          tftpassert(buflen >= 4, "malformed ERR packet, too short")
          log.debug("Decoding ERR packet, length %s bytes", buflen)
          if buflen == 4:
              log.debug("Allowing this affront to the RFC of a 4-byte packet")
              fmt = b"!HH"
              log.debug("Decoding ERR packet with fmt: %s", fmt)
              self.opcode, self.errorcode = struct.unpack(fmt,
                                                          self.buffer)
          else:
              log.debug("Good ERR packet > 4 bytes")
              fmt = b"!HH%dsx" % (len(self.buffer) - 5)
              log.debug("Decoding ERR packet with fmt: %s", fmt)
              self.opcode, self.errorcode, self.errmsg = struct.unpack(fmt,
                                                                       self.buffer)
          log.error("ERR packet - errorcode: %d, message: %s"
                       % (self.errorcode, self.errmsg))
          return self