Improve Python 3.x compatibility

Per (proposed) Hacking H203 check, use the
non-deprecated except x as y: construct, which
works with any Python version >= 2.6

Change-Id: I42935ada01ea7487d76040832578e06ac8ad87dd
Merge "Improve Python 3.x compatibility"