python - Excepting an error from a library an import is using -
python - Excepting an error from a library an import is using -
i want except requests.exceptions.connectionerror, beingness raised library importing. not importing requests. how can except specific exception?
if need grab connectionerror can import error , grab other error
from requests.exceptions import connectionerror try: code_that_raises_connection_error() except connectionerror: handle() python import module
Comments
Post a Comment