Any public officer who willfully neglects to perform a duty imposed upon him under the election laws, for which no other penalty is provided, or who willfully performs such duty in a way that hinders the objects of the election laws, shall be guilty of a Class B misdemeanor.