Career
He was first elected to Dáil Éireann as a Labour Party Teachta Dála (TD) for the Wexford constituency at the 1943 general election. He was re-elected at the 1944 and 1948 general elections as a National Labour Party TD. At the 1951 and 1954 general elections, he was once again elected as a Labour Party TD. O'Leary was defeated at the 1957 general election, but was elected to the 9th Seanad by the Administrative Panel. He died in office in 1959, and John J. Brennan of Fianna Fáil was elected at a by-election to replace him.