PEP8 fix and removed unusued exception handler