Section 40(1)

40. (1) If the District judge after making such inquiry as he thinks necessary, finds in respect of any person whose election is called, in question by petition, that his election was valid, the petition all be dismissed against such person with costs.