152. Whoever assaults or threatens to assault, or obstructs or attempts to obstruct, to any public servant in the discharge of his duty as such public servant in endeavouring to disperse an unlawful assembly or to suppress a riot or affray, or uses, or threatens or attempts to use, criminal force to such public servant, shall be punished with imprisonment for a term which may extend to three years or with fine or with both.