Any police officer in commission, whether in uniform or in citizen's clothes, who shall be within one hundred (100) feet of a polling place during the conduct of any primary or election, except in the exercise of his privilege of voting or for the purpose of serving warrants, or in accordance with the provisions of the exception set forth in section 1207 of this act where the police station or headquarters is located in the same building or on the premises where the polling place is located or unless called upon to preserve the peace, as provided by this act, shall be guilty of a misdemeanor, and, upon conviction thereof, shall be sentenced to pay a fine not exceeding five hundred ($500) dollars, or to undergo an imprisonment of not more than one (1) year, or both, in the discretion of the court.
25 P.S.§ 3520