The former Peterborough MP will spend September in jail, where he can serve as a cautionary tale to politicians everywhere.

Dean Del Mastro, the former Conservative MP for Peterborough, former ethics spokesman for Stephen Harper, lost his second appeal at the Ontario Court of Appeal on Wednesday, which means he can no longer avoid his 30-day sentence for election crimes.

Del Mastro is now waiting in the chow line with other inmates, likely at the Central East Correctional Centre in Lindsay, Ont., a testament to the fact that Canada is a nation of laws, and the powerful, if they are sufficiently dim-witted or bull-headed, can be made to pay for their crimes.

It’s as ugly a story as we have seen in Canadian politics in recent memory, but it has a good moral. There is a limit, a firm limit, on how far bologna will take a man.

And do not doubt that Del Mastro is the author of his own misfortune. He could have avoided his jail cell if he had been prepared to respect the law, either by following it or, when he was caught, acknowledging that he had broken it and saying he was sorry.

His failure to respect the law says something about an occupational hazard of high political office: the mistaken belief that with enough spin you can manage anything.

The story starts in 2008, when Del Mastro was running for re-election in Peterborough. The riding was safe, but he wanted to rack up his margin of victory, so he secretly paid for $21,000 on election calls with a personal cheque, blowing past the $92,567 spending cap.

This kind of thing likely happens often enough. Political pros say many campaigns have second, off-the-book accounts that nobody ever hears about.

Del Mastro made a really big mistake, though, when he refused to pay his supplier, cooking up an elaborate scheme featuring cancelled cheques, forged documents and personal attacks on the supplier’s credibility.

Once he made up his story, he stuck with it.

As he once said in the House of Commons: “I often tell people that I have a distinct design flaw. It is that I was not built with a reverse gear. I only know how to go forward, and I will press forward.”

In the House, Del Mastro specialized in partisan bluster, smearing his government’s critics at the prime minister’s bidding, an unusually thuggish attack dog, but part of a long tradition in Canadian politics.

He erred, though, in believing that the partisan nonsense that works in the House of Commons would work in a court of law. He seems to have believed his own spin, an extreme example of an occupational hazard that all politicians face.

In 2012, when the facts of the case first became public, the evidence looked like it was going to be tough for him to explain, but he carried on, treating witnesses, investigators and journalists like partisan opponents and promising that he would explain everything and eventually get revenge on his accusers. He talked fast and loud, burst into tears, swore that he was being treated unfairly and said he was anxiously awaiting his day in court.

He could have just come clean with Elections Canada and made a deal, which might have interrupted his political career, but he would not gone to jail. Instead, he used his role as Harper’s parliamentary secretary to attack investigators, witnesses and journalists, in the House of Commons and on TV, and lied, over and over again.

In 2014, at his trial, he testified for days, trying to convince Justice Lisa Cameron to buy a convoluted story, featuring a cheque taken from his wife’s purse, asking Cameron to ignore computer records and testimony that showed that investigators had him dead to rights.

I sat in the courtroom and listened to him spin obvious falsehoods, forced by inconvenient facts to increasingly unlikely lies, and came to believe that he must not have been following his lawyer’s advice, which must have been to shut up and let the lawyer work a narrow, technical argument.

READ MORE: The case of Dean Del Mastro and the cheques

Cameron’s ruling was harsh but unavoidable.

“He was prepared not only to break the rules but to be deceitful about it,” she said in her ruling. “This type of cheating and lying will result in serious sanctions.”

Del Mastro, on the courthouse steps, disagreed with her view.

“That’s her opinion,” he said, unwisely. “My opinion is quite different.”

There is nothing pleasant about the whole saga, and it isn’t nice to think of Del Mastro in prison with hillbilly meth heads. Many people who have done worse things have got off easier. His family doesn’t deserve to suffer as they are, and it does seem absurd that someone should pay such a high price for a trifling breach of election law. Still, it is heartening to see the law prevail.

Politicians make the most treacherous defendants, because they are better able to attack their accusers than are most criminals, which makes them dangerous. Del Mastro lied about other people to avoid the consequences of his own actions, and for that reason it is hard to feel bad for him.

Intoxicated by power, he believed that he could lie and bully his way out of a jam. We should all be glad that he couldn’t, that there’s a limit to how far spin will take a fellow.