A man found with cocaine and a weighing scales on his kitchen table when his home was raided by gardaí was caring for his baby son at the time.
Alan O'Dwyer of 11 Cois Abhainn in Crossbarry, Co Cork, was at home when officers from the West Cork Divisional Drugs Unit arrived at the property on 24 November last.
Bandon District Court heard that Mr O'Dwyer, 36, was present with his five-month-old son.
Mr O'Dwyer showed officers the kitchen table, on which was cocaine and a weighing scales were found.
Judge James McNulty also heard that €2,120 in cash was found in Mr O'Dwyer's wallet and that he took responsibility for the €400 worth of cocaine found in the premises.
Mr O'Dwyer pleaded guilty to simple possession of the drugs and having the substances for the purpose of sale or supply.
The court heard that he had 49 previous convictions, including one previous conviction for the sale or supply of drugs, for which he received a two-year suspended sentence.
His solicitor, Daithi O'Donnabhain, said Mr O'Dwyer had made early admissions and voluntarily attended at a Garda station for interview.
He said his client disputed the source of the money found in the wallet, stating this was a returned deposit as they are going to be leaving the property. He also said Mr O'Dwyer told gardaí he was not selling cocaine but was sharing it between himself and his friends.
Mr O'Donnabhain told the judge that Mr O'Dwyer and his partner were expecting a second child and had been taking steps to tackle his addiction issues.
Judge McNulty said: "The court takes a most grave view of the offence itself and of his reoffending, where he was dealt with leniently previously."
He sentenced Mr O'Dwyer to 10 months in jail on the more serious charge and a separate sentence of two months for possession of the drug, to be served concurrently. Mr O'Dwyer lodged an appeal against the sentences.