Cleaner error handling for pylint.