Every person, partnership, association, or corporation violating the provisions of sections
291 to
293 of this title, and every officer, director, or managing agent of such partnership, association, or corporation having knowledge of such violation and directly participating in such violation or consenting thereto, shall be deemed guilty of a misdemeanor, and, upon conviction, be punished with a fine of not more than $5,000 or imprisonment for not more than one year, or both, at the discretion of the court.