2to3: Use modern exception syntax.

Example:  except ValueError,msg: -> except ValueError as msg:
Merge pull request #3023 from charris/2to3-except

2to3: Use modern exception syntax.