Python Https Request Exception Handling Program