A Dundee man was jailed for 16 months.
Derek Nicholson, 46, of St Mary Street, admitted possession of a knife at Lower Pleasance on May 14 last year.
The court heard police received intelligence that Nicholson was heading towards Lochee Road with a knife. He was traced and the weapon was recovered.
Solicitor Anika Jethwa told the court Nicholson was paranoid due to years of drug abuse, but that he was taking steps to turn his life around.