(a) Every district attorney, clerk, judge, or peace officer who, except by issuing or in executing a search warrant or warrant of arrest for a felony, willfully discloses the fact of the warrant prior to execution for the purpose of preventing the search or seizure of property or the arrest of any person shall be punished by imprisonment in a county jail not exceeding one year or pursuant to subdivision (h) of Section 1170.
(b) This section shall not prohibit the following:
(1) A disclosure made by a district attorney or the Attorney General for the sole purpose of securing voluntary compliance with the warrant.
(2) Upon the return of an indictment and the issuance of an arrest warrant, a disclosure of the existence of the indictment and arrest warrant by a district attorney or the Attorney General to assist in the apprehension of a defendant.
(3) The disclosure of an arrest warrant pursuant to paragraph (1) of subdivision (a) of Section 14207.
(Amended by Stats. 2014, Ch. 437, Sec. 7.)