A Gainsborough man was detained by police after he was spotted outside a town supermarket armed with a knife, a court heard.
James Mulholland, who at the time of the incident was under the threat of a suspended jail sentence, was seen in possession of the weapon outside the town’s Aldi store in Lea Road, Gainsborough.
Jonathon Dee, prosecuting, told Lincoln Crown Court that Mulholland was identified by an off-duty police officer and was arrested at the scene.
Mr Dee said: “He was stopped and searched.
“A knife was found in his back pocket. A packet containing 36 tablets was also found.
“The defendant stated they were diazepam and that he had bought them.
“The court was told that the tablets were not analysed by the prosecution and so Mulholland was only charged with the attempted possession of drugs rather than actual possession.”
Mr Dee said Mulholland had a lengthy previous record of offending including a number of past convictions for possession of a knife.
James Mulholland, 43, of Linden Terrace, Gainsborough, pleaded guilty to possession of a bladed article in a public place and attempted possession of class B drugs.
He also admitted a breach of a 10 month suspended jail sentence which was imposed in July 2014 for an offence of theft.
Andrew Vout, in mitigation, said that Mulholland made a genuine mistake when he went out with the knife.
He added: “The fact of the matter is that the suspended sentence was imposed for a completely different type of offence.”
Mulholland was given a new 12 month jail sentence suspended for two years together with a three-month electronically monitored curfew to operate between 9pm and 7am.
He was also ordered to pay £150 for a Criminal Court Charge.
Judge Stuart Rafferty QC, passing sentence, told Mulholland: “You are doing better than you have in the past.
“Your offending is slowing down and fortunately drugs seem now to be something in the past.
“However you simply cannot walk about with knives in your possession.
“This was a very expensive mistake for you.”