If there is a contest for such office, or if the person elected to such office is prevented or obstructed in any manner from entering upon the duties of such office, the time prescribed in which he shall qualify and enter upon the duties of his office shall not govern, and he shall be allowed twenty days after the day of such decision or the termination of such preventing or obstructing cause in which to qualify.
SDCL 3-1-3