Use Python 3.x compatible except construct.

Python 3.x deprecated the form "except x,y:". Switch usage to
"except x as y:", which works with any Python version >= 2.6

Change-Id: Id276fdaee9e8753568227e638408e5bccff28e67