The judge upheld Jose Alonso Compean 's original punishment and resentenced him to 10 years in prison for his conviction on a charge of using a weapon in the commission of a felony and another two years in prison for assault and other charges , the U.S. Attorney 's Office said .