Any person who shall make a false affidavit, where an affidavit is required under any of the provisions of this chapter, shall, except as otherwise provided, be deemed guilty of a misdemeanor, and, upon conviction thereof, shall be fined not exceeding $1,000, or confined in the county jail not exceeding one year, or, in the discretion of the court of justice, both fined and imprisoned.