The court or judge to whom the application for a writ of habeas corpus is made, shall forthwith award the writ, unless it shall appear from the application itself or from any document annexed thereto, that the applicant can neither be discharged nor admitted to bail, nor in any other manner relieved.
SDCL 21-27-5