Whistle-blowers have really taken it on the chin in the Obama years. Chelsea Manning, who leaked thousands of classified documents, got 35 years in prison. John Kiriakou, who first confirmed the CIA's torture program, served most of a 30-month sentence in federal prison. Jeffrey Sterling, who leaked some classified documents about Iran's nuclear program to New York Times reporter James Risen, was recently convicted of espionage and could face decades in prison.

Overall, Obama's Department of Justice has prosecuted more leakers under the Espionage Act than all previous administrations put together. But despite that law-and-order vigor, some leakers of classified documents get the kid glove treatment.

In the case for howling government hypocrisy on the subject of Espionage Act prosecutions, David Petraeus is Exhibit A. The former head of the CIA was caught sharing extremely classified documents with his biographer and mistress Paula Broadwell, storing them in an unlocked desk drawer, and then lying about it to FBI and CIA officials (another crime). What's his punishment? A guilty plea for one misdemeanor count, for which prosecutors will recommend two years probation.

It's important to remember that the documents Petraeus leaked and stored so carelessly were at least as sensitive as any leaked by the aforementioned whistle-blowers, if not more so. As Trevor Timm notes, the plea bargain shows gross, almost unbelievable irresponsibility. Petraeus revealed "classified information regarding the identities of covert officers, war strategy, intelligence capabilities and mechanisms, diplomatic discussions, [and] quotes and deliberative discussions from high-level National Security Council meetings." That's not to mention personal discussions with the president.

The documents he showed Broadwell included Sensitive Compartmented Information (SCI, or "code word" files) that are classified above Top Secret. Nothing Manning revealed, by contrast, was classified more than Secret.

How has the establishment responded? Let's go to Brookings fellow Michael O'Hanlon, who appears to be auditioning to become the next biographer of the man who once oversaw the U.S. wars in Iraq and Afghanistan:

In understanding the travails of Petraeus today, and sizing up what his career has meant to the country, we should think first and foremost about his excellence across many domains of military and strategic endeavor. To my mind, what he did in Iraq was probably the greatest complex accomplishment by any American general since Washington in the Revolutionary War. [Politico]

Losing two wars while possibly running a secret network of torture centers is apparently all it takes for elite Washington to forget about Eisenhower, Marshall, or Grant.

O'Hanlon does, however, nicely illustrate the double standard at work here. Petraeus is a made man, someone who gets stupendously lucrative consulting gigs and quasi-professorships and banking jobs dropped in his lap by the score. It's a safe bet that his private equity career will continue undiminished despite the conviction.

And this only scratches the surface. The only reason Petraeus is being punished for his colossal indiscretion is because it intersects with one of the few things elite culture still sort of cares about: a sex scandal. If he had merely leaked classified information to advance the government's PR agenda, it is a virtual certainty he'd still be at the CIA, maybe even prepping a presidential run.

Leaking classified information to flatter the government is taken for granted in Washington. Leon Panetta, former secretary of Defense and CIA director, once leaked classified details to the filmmakers of Zero Dark Thirty. According to the Senate torture report, the CIA routinely leaked classified documents to manipulate the media into covering the organization positively. As Chris Hayes once noted, "[W]hen, as with Glenn Greenwald's reporting, the leaks are not specifically designed to advance the Pentagon's agenda, then we have shock and controversy and calls for prosecution. But when they are [so designed]...radio silence."

So, as President Obama might say, let's not get too sanctimonious when it comes to whistle-blowers breaking the law. Because in America, it turns out legal punishment is allotted according to social status, not to the supposed severity of the crime.