Section 146. If a poor prisoner has been confined in a jail or house of correction for one month under one or more sentences for fine or fine and expenses only, the jailer, superintendent or keeper shall make a report thereof, in Suffolk county to the municipal court of the city of Boston, and in other counties to a district court. The court shall inquire into the truth of the report, and may require the jailer, superintendent or keeper to bring the prisoner into court. If the court finds that the report is true, and that the prisoner since his confinement has not had any property, real or personal, with which he could have paid the amount or amounts for which he was committed, it shall, if it finds that he is held for no other cause, and may, if it finds that he is held only for one or more other sentences for fine or fine and expenses, order the sheriff, superintendent or keeper to discharge the prisoner. If a poor prisoner has been confined in a correctional institution of the commonwealth on a sentence with fine, after one month from the date of release by parole or otherwise on the term sentence, the superintendent shall make a report thereof to the district court. The court shall inquire in the truth of the report and if the court finds the report is true and the prisoner has had no property, real or personal, with which he could have paid the amounts of fine for which he is held and that he is held for no other cause, may order the superintendent to discharge the prisoner. A person under guardianship may have the benefit of this section, although it appears that he has property held under guardianship, if it also appears that such property is beyond his actual control; and if he is discharged the commonwealth may, in an action of tort brought within one year after the discharge, recover from his guardian, if he has assets, the amount of fine or fines and expenses remaining unpaid.