375. No appeal in certain cases when accused pleads guilty.

(a) if the conviction is by a High Court; or
(b) if the conviction is by a Court of Session, Metropolitan Magistrate or Magistrate of the first or second class, except as to the extent or legality of the sentence.