An injunction cannot be granted: (1) To stay a judicial proceeding pending at the commencement of the action in which the injunction is demanded, unless such restraint is necessary to prevent a multiplicity of such proceedings; (2) To stay proceedings in a court of the United States; (3) To stay proceedings in another state upon a judgment of a court of that state; (4) To prevent the execution of a public statute, by officers of the law, for public benefit; (5) To prevent the breach of a contract, the performance of which would not be specifically enforced; (6) To prevent the exercise of a public or private office in a lawful manner, by the person in possession; (7) To prevent a legislative act by a municipal corporation; (8) To enforce a penal law, except in case of nuisance or except when specifically authorized by statute; (9) To enforce a penalty or forfeiture in any case. Source: CivC 1877, §§ 1990, 2017; CL 1887, §§ 4623, 4650; RCivC 1903, §§ 2335, 2362; RC 1919, §§ 2031, 2035; SDC 1939 & Supp 1960, § 37.4302; SL 1978, ch 155 , § 6.