Nicolas Sarkozy , the French president , used some smart diplomatic footwork on Thursday to quell a rebellion by eight European Union countries that had threatened to stall the bloc 's effort to agree on a wide range of climate reforms by the end of the year .