Chapter III. Attempt and Participation.
Art. 21
Penalty shall not be ordered on account of an attempted offence if the offender of his/her own accord abandons his/her intention to commit the offence before it has been completed, provided the commission of the offence has not been thwarted or an impediment or other fortuitous occurrence have prevented the offender's design from being achieved and the offender has, in addition, if he/she has by his/her act caused or expected a danger of completion, prevented its completion or taken measures that would have prevented it, if completion had not been thwarted for other reasons without his/her knowledge or proved impossible.
EDIT.