Compare commits

...
This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.

1 commit
exec ... master

Author SHA1 Message Date
dece 471c07122d protocol: catch create_connection UnicodeErrors 2023-01-04 00:09:25 +01:00

View file

@ -153,6 +153,11 @@ class Request:
self.state = Request.STATE_CONNECTION_FAILED self.state = Request.STATE_CONNECTION_FAILED
self.error = exc.strerror self.error = exc.strerror
return False return False
except ValueError as exc:
self.state = Request.STATE_INVALID_URL
self.error = "Some connection parameter is wrong, check again."
logging.error(f"ValueError during connection creation: {exc}")
return False
# Setup TLS. # Setup TLS.
context = Request.get_ssl_context() context = Request.get_ssl_context()