Robert Joe Halderman, a CBS producer who was accused of a $2 million extortion attempt against TV host David Letterman, pleaded guilty at a Manhattan court on Tuesday to attempted grand larceny.

Halderman entered his guilty plea in exchange for a six month sentence in jail and 1,000 hours of community service. If Halderman had gone to trial, he faced up to 15 years in prison if convicted.

In September of 2009, I attempted to extort two million dollars from David Letterman by threatening to disclose personal and private information about him, whether true or false, Halderman told the court, according to Reuters.

Halderman is the producer of CBS 48 Hours Mystery. He had pleaded not guilty to charges of grand larceny and his lawyers had said their client was offering to sell Letterman a screenplay about the comedian's life.