The provisions of this chapter shall not apply to any sale conducted by a public officer as part of his official duties, or to any sale an accounting of which must be made to a court of law, or to any sale conducted pursuant to an order of a court of law.