mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 10:59:21 +02:00
noting why type is ignored
This commit is contained in:
parent
a75caa2fdb
commit
6e13345161
1 changed files with 4 additions and 2 deletions
|
@ -62,6 +62,8 @@ class EPPLibWrapper:
|
||||||
client. Raises errors if initialization fails.
|
client. Raises errors if initialization fails.
|
||||||
This method will be called at app initialization, and also during retries."""
|
This method will be called at app initialization, and also during retries."""
|
||||||
# establish a client object with a TCP socket transport
|
# establish a client object with a TCP socket transport
|
||||||
|
# note that type: ignore added in several places because linter complains
|
||||||
|
# about _client initially being set to None, and None type doesn't match code
|
||||||
self._client = Client( # type: ignore
|
self._client = Client( # type: ignore
|
||||||
SocketTransport(
|
SocketTransport(
|
||||||
settings.SECRET_REGISTRY_HOSTNAME,
|
settings.SECRET_REGISTRY_HOSTNAME,
|
||||||
|
@ -73,9 +75,9 @@ class EPPLibWrapper:
|
||||||
try:
|
try:
|
||||||
# use the _client object to connect
|
# use the _client object to connect
|
||||||
self._client.connect() # type: ignore
|
self._client.connect() # type: ignore
|
||||||
response = self._client.send(self._login) # type:ignore
|
response = self._client.send(self._login) # type: ignore
|
||||||
if response.code >= 2000: # type: ignore
|
if response.code >= 2000: # type: ignore
|
||||||
self._client.close() # type:ignore
|
self._client.close() # type: ignore
|
||||||
raise LoginError(response.msg) # type: ignore
|
raise LoginError(response.msg) # type: ignore
|
||||||
except TransportError as err:
|
except TransportError as err:
|
||||||
message = "_initialize_client failed to execute due to a connection error."
|
message = "_initialize_client failed to execute due to a connection error."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue