2to3: Use modern exception syntax.

Example:  except ValueError,msg: -> except ValueError as msg: