A Kansas man who robbed a bank last September and told police that he was hoping to get caught so he would get prison time to escape his wife, was sentenced Tuesday to six months of home confinement after pleading guilty, The Kansas City Star reported.

Lawrence John Ripple took the guilty plea in January. He told the judge on Tuesday that he had heart surgery that left him depressed when he committed the bank robbery, the paper reported.

His public defender told the court that ripple had lived a law-abiding life and was in a stable relationship with his wife. He has four step children, the report said.

Ripple handed a note to a bank teller in Kansas City, demanding cash and warning he had a gun. Ripple took the money0-- $2,924-- and went to sit in the lobby where he told a guard he was the “guy he was looking for.”

Officers arrived quickly. An FBI agent wrote in the affidavit that Ripple had earlier been arguing with his wife. He told investigators he wrote the note in front of his wife, telling her he would “rather be in jail than at home.”

The Associated Press contributed to this report