David Walker, who was already on a suspended sentence, tried to tell Judge Tom Bayliss QC that he would “not let him down” after he was given another chance during an appearance at Leeds Crown Court this week.
But Judge Bayliss interjected and said: “Just go before I change my mind. Count yourself very lucky indeed.”
Walker, 49, had admitted a charge of assaulting an emergency worker after an incident in Knottingley on May 26.
Police had been called to an ongoing incident at around midnight on Weeland Lock Mews, where Walker lives, prosecutor Andrew Pickin said.
They tried to get Walker out of the property but he went limp, so had to be dragged out.
He then got up and tried to headbutt one of the officers, but narrowly missed.
Walker later apologised and said he had been taking sleeping pills.
He has 17 convictions for 23 offences, including for violence.
Notably, he committed the latest offence while on a suspended 12-month jail sentence from last year, for harassment and breach of a restraining order.
A probation report suggested he was making progress, and his barrister Matthew Moore-Taylor said he admitted his guilt at the first opportunity.
Judge Bayliss said: “It’s against my better judgement but I’m going to impose another suspended sentence.”
He gave him four months, suspended for 12 months, and told him his previous suspended sentence will remain in place.