Any public officer who shall consent to the escape of a prisoner custody or charge, shall be punished:
1. By prision correccional in its medium and maximum periods and temporary special disqualification in its maximum period to perpetual special disqualification, if the fugitive shall have been sentenced by final judgment to any penalty.
2. By prision correccional in its minimum period and temporary special disqualification, in case the fugitive shall not have been finally convicted but only held as a detention prisoner for any crime or violation of law or municipal ordinance.