Section 2. A seaman or mariner who has shipped or entered into a contract for a voyage from a port in this commonwealth shall not be arrested on mesne process on account of a debt to a landlord or boarding house keeper; nor shall a landlord or boarding house keeper detain or have a lien upon his wearing apparel or other property, or hinder, obstruct or delay him in the performance of such contract. Violation of this section shall be punished by a fine of not more than two hundred dollars.