
253 Cal.App.2d 362 (1967)
THE PEOPLE, Plaintiff and Respondent,
v.
EDWARD JOHN ESPARZA, Defendant and Appellant. [253 Cal.App.2d 363]
Crim. No. 355. 
California Court of Appeals. Fifth Dist.  
Aug. 8, 1967.
 Edward John Esparza, in pro. per., for Defendant and Appellant.
 Thomas C. Lynch, Attorney General, Raymond M. Momboisse and John F. Biehl, Jr., Deputy Attorneys General, for Plaintiff and Respondent.
 GARGANO, J.
 According to the record which we have carefully reviewed, appellant, who was represented by counsel, pleaded guilty on July 19, 1962, to assault with a deadly weapon in violation of Penal Code section 245. Thereafter, appellant applied for probation and on August 6, 1962, he appeared in court with his counsel for the probation hearing. At the conclusion of the hearing the court suspended imposition of sentence and placed appellant on probation for a period of three years, subject to the usual conditions and subject to the further condition that he serve the first 10 months of his probationary period in the county jail. On or about February 27, 1964, (while appellant was still on probation) appellant's probation was revoked and he was sentenced to the state prison for the term prescribed by law, for the crime to which he had pleaded guilty in 1962. On December 6, 1966, defendant petitioned the Superior Court of Fresno County for a writ of error coram nobis, alleging the following grounds for relief: "(a) 'Excessive punishment' in a cruel an [sic] unusual manner. (b) Equal protection of the law. Illegal resentencing. (c) Denial of due process of law. Double-Jeopardy." Appellant's petition was denied by the respondent court and appellant has appealed.
 [1] We agree with respondent's contention that no relief is available under a writ of coram nobis where the alleged error is one of law rather than fact (People v. Banks, 53 Cal.2d 370 [1 Cal.Rptr. 669, 348 P.2d 102]). [2] In fact, the scope of a writ of coram nobis is delineated in People v. Shipman, 62 Cal.2d 226, 230 [42 Cal.Rptr. 1, 397 P.2d 993], as follows: "The writ of coram nobis is granted only when three requirements are met. (1) Petitioner must 'show that some fact existed which, without any fault or negligence on his part, was not presented to the court at the trial on the merits, and which if presented would have prevented the rendition of the judgment.' [Citing cases.] (2) Petitioner must also show that the 'newly discovered evidence ... [does not go] to the merits of issues tried; issues of fact, once adjudicated, even though incorrectly, cannot be reopened *364 except on motion for new trial.' [Citing cases.] This second requirement applies even though the evidence in question is not discovered until after the time for moving for a new trial has elapsed or the motion has been denied. [Citing cases.] (3) Petitioner 'must show that the facts upon which he relies were not known to him and could not in the exercise of due diligence have been discovered by him at any time substantially earlier than the time of his motion for the writ. ...' [Citing cases.]" [3] Hence, it is manifest that appellant's petition for a writ of error coram nobis fails to meet the requirement of Shipman and was properly denied by the respondent court.
 Furthermore, we do not even find it necessary to determine whether the respondent court should have treated appellant's petition as a petition for a writ of habeas corpus. This is so because the main thrust of appellant's argument is the erroneous assertion that he was twice sentenced for the same crime, i.e., the first time by misdemeanor sentence (the 10 months' confinement in the county jail), and the second time by a felony sentence (imprisonment in the state prison). In other words, pointing to Penal Code section 245 which provides that an assault with a deadly weapon is punishable by imprisonment in the state prison or in a county jail, appellant erroneously contends that, by virtue of his confinement in the county jail after he pleaded guilty in 1962, the offense became a misdemeanor by virtue of the provisions of Penal Code section 17. Accordingly, he also erroneously concludes that when his probation was revoked and he was sentenced to state prison, the misdemeanor conviction was increased to a felony conviction, and he was twice punished for the same offense.
 As we have indicated, defendant's position is entirely without merit. The fallacy of his argument is that it overlooks the critical fact that he was not sentenced to the county jail within the meaning of Penal Code section 17 after he pleaded guilty in 1962, and thus the offense did not ever become a misdemeanor under this section. To the contrary, after appellant pleaded guilty to an assault with a deadly weapon in violation of Penal Code section 245 the court suspended imposition of sentence and placed him on probation. Under these circumstances he stood convicted of a felony for all purposes. [4] It is settled that where the offense is alternatively a felony or misdemeanor (depending upon the sentence), and the court suspends the pronouncement of judgment or imposition of sentence and grants probation, the *365 offense is regarded a felony for all purposes until judgment or sentence and if no judgment is pronounced it remains a felony (People v. Banks, 53 Cal.2d 370 [1 Cal.Rptr. 669, 348 P.2d 102]; People v. Williams, 27 Cal.2d 220 [163 P.2d 692]; People v. Lippner, 219 Cal. 395 [26 P.2d 457]). It is of course true that appellant spent 10 months in the county jail, but this confinement was a condition of probation and did not constitute a sentence within the meaning of Penal Code section 17. Thus, when the court revoked appellant's probation it properly sentenced him to the state prison and by doing so did not increase his offense from a misdemeanor to a felony.
 The judgment is affirmed.
 Conley, P. J., and Stone, J., concurred.
