Fix PEP-8 issues.
Use new syntax for catching exceptions.