In all cases where an offense is denominated by this article as being a misdemeanor and no penalty is specified, the offender, upon conviction thereof, shall be punished by a fine of not more than one thousand dollars, or by imprisonment in the county jail for not more than one year, or by both such fine and imprisonment.