If President Trump was looking for comfort Thursday morning following the three-year prison sentence handed to his former lawyer, Michael Cohen, he certainly didn’t get it from Fox News legal analyst Andrew Napolitano.

Napolitano, a former New Jersey Superior Court judge, appeared on one of the TV-obsessed president’s favorite cable news shows, Fox & Friends, explaining to the Trump-friendly hosts why the hush-money payouts made to silence allegations affairs weeks before the 2016 election were a crime.

“If you make an honest mistake in failing to report something … you can correct that by returning the money, paying a fine, and correcting the report,” Napolitano said. “If you do this as part of a scheme to hide it, then it’s not a civil wrong, then it’s a crime. That’s what the judge found yesterday.”

Napolitano also threw cold water on parallels being drawn to a case involving former Democratic presidential candidate John Edwards, who was ultimately found not guilty of campaign-finance violations after paying off a former mistress to cover up an affair and a illegitimate child.

“The John Edwards case actually hurts the president, because John Edwards’ lawyers made a motion to dismiss the indictment saying it’s not a crime, and the judge published an opinion saying why it’s a crime,” Napolitano said.

Over on CNN, legal analyst and former federal prosecutor Shan Wu made a similar point, noting that Edwards was ultimately indicted and faced trial, where a jury ultimately found him not guilty on one of six counts. They deadlocked on the remaining charges, which the Justice Department ultimately dropped.

Wu also pointed out differences in the timing of the two cases, noting that Edwards made the payouts more than a year before the election. He also pointed to audio tapes allegedly recorded in September 2016 by Cohen discussing the details around the payouts with Trump.

“The problem for the president’s defense there is that the element here is that it’s hiding the contribution with the intent to influence the election," Wu said. “There’s enough to indict him there.”

A federal judge in Manhattan sentenced Cohen Wednesday to three years in prison. Cohen had previously pleaded guilty to a host of crimes, including campaign-finance violations that involve hiding payouts allegedly ordered by Trump to silence former Playboy model Karen McDougal and porn star Stormy Daniels, who claimed they had sexual encounters with the president.

The Justice Department said Trump directed Cohen to make the payment to influence the election, linking the president to a federal crime. But on Twitter Tuesday morning, the president denied directing Cohen to break the law and attempted to make the case that the federal crimes his former lawyer pleaded guilty to weren’t actually crimes.

“He was a lawyer and he is supposed to know the law,” Trump wrote on Twitter about Cohen. The president added that Cohen “was guilty on many charges unrelated to me, but he plead to two campaign charges which were not criminal and of which he probably was not guilty even on a civil basis."

MSNBC legal analyst Frank Figliuzzi, a former counterintelligence director at the FBI, predicted Trump’s defense Wednesday and shot it down during a discussion on Deadline White House.

“Let’s keep focusing on this: [Prosecutors] are saying that it was directed by the president. You’re going to hear the president repeatedly issue a defense of, ‘My lawyer did it. I didn’t know what he was talking about.’ But the tapes are there,” Figliuzzi said. “The [Southern District of New York] would not have gone forward with this prosecution unless they understood that the president was engaged in this crime.”

CNN legal analyst Jeffrey Toobin, meanwhile, said it’s worth remembering that if voters had known in 2016 that Trump ordered payouts to keep the allegations of affairs with two woman silent, “it might well have swung the election.”

“Of all times to make these expenditures, it’s right on the eve of the election,” Toobin said. “This was an embarrassing, politically toxic subject for him, and he wanted to cover it up, so he paid the money to cover it up to help him win the presidency.”