No person shall be convicted of an offense under Section 577 or 578 by reason that the contents of any barrel, box, case, cask, or other vessel or package mentioned in the bill of lading, receipt, or other voucher did not correspond with the description given in the instrument of the merchandise received, if the description corresponded substantially with the marks, labels, or brands upon the outside of the vessel or package, unless it appears that the accused knew that the marks, labels, or brands were untrue.
Ca. Pen. Code § 579