That if any person other than the election officers shall secrete or attempt to secrete himself in any part of the polling room during the hours of the election for any purpose whatsoever he shall be deemed guilty of a misdemeanor and upon conviction thereof he shall be fined not less than one hundred dollars, and may in the discretion of the court be imprisoned for a term not exceeding one year.