When there exists no such provision by statute, the court shall proceed to punish such offense by fine or imprisonment, but the fine shall not exceed $500, nor the imprisonment 12 months.