Part I. General Provisions
Chapter 4. Attempt
Section 50.
An attempt shall cease to be punishable if the offender, before he knows that the felonious activity has been discovered, of his own free will either desists from the felonious activity before the attempt has been completed or prevents the result that would constitute the completed felony.
EDIT.