Better error message when signal is not supported on OS
# What does this PR do?

This PR adds a `try`/`except` block around the logic asking the user whether they want to execute the code on a distant repo when they don't set `trust_remote_code=True` to give a helpful error message.

Fixes #25029
_The documentation is not available anymore as the PR was closed or merged._