Use Python 3.x compatible except construct

Python 3.x removed the "except x,y:" construct. Use
"except x as y:" instead which works with all
Python versions >= 2.6.

Change-Id: Iedb4c5a6d8580cbb6c9697933d006e94b1db916d