Judgment unanimously affirmed. Memorandum: Relator is serving an indeterminate sentence up to four years imposed on October 27, 1975 following his plea of guilty for attempted criminal possession of a weapon in the third degree. On April 28, 1976 relator was granted a writ of habeas corpus upon a petition which alleged that his conviction was illegally obtained. The record at the hearing on the application reveals that relator had an appeal pending from his judgment of conviction and sentence. For that reason, the trial court dismissed the petition on July 21, 1976. Relator’s subsequent request that his appeal be dismissed was granted by order dated October 12, 1976. This appeal from the dismissal of the habeas corpus petition followed. Thus, the factual posture of the case before us is different from that before the trial court because there is now no appeal pending. Such distinction does not compel a different result. Habeas corpus is not to be utilized as a substitute for an appeal absent reason of practicality or necessity (People ex rel. Keitt v McMann, 18 NY2d 257, 262). In this case relator elected not to pursue his appeal where the alleged error could have been reviewed. Such election does not constitute a reason of practicality or necessity to warrant the granting of habeas corpus relief (People ex rel. Tanner v Vincent, 44 AD2d 170, 174, affd 36 NY2d 773; People ex rel. Davis v Smith, 54 AD2d 1131). (Appeal from judgment of Wyoming Supreme Court—habeas corpus.) Present—Marsh, P. J., Cardamone, Dillon, Goldman and Witmer, JJ.