412. Notwithstanding anything hereinbefore contained where an accused person has pleaded guilty and has been convicted by 448[* * *] a Court of Session 449[or any Metropolitan Magistrate] or Magistrate of the first class on such plea, there shall be no appeal except as to the extent or legality of the sentence.