Debug client bug

This commit is contained in:
zandercymatics 2023-10-19 07:59:09 -06:00
parent ceb2e5ec66
commit 825d07ba7c
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 58 additions and 16 deletions

View file

@ -1,13 +1,15 @@
import logging
from time import sleep
from epplibwrapper.utility.pool_error import PoolError, PoolErrorCodes
try:
from epplib import commands
from epplib.client import Client
except ImportError:
pass
from .errors import LoginError
from .errors import LoginError, SocketError
logger = logging.getLogger(__name__)
@ -46,8 +48,9 @@ class Socket:
Tries 3 times"""
# Something went wrong if this doesn't exist
if not hasattr(self.client, "connect"):
logger.warning("self.client does not have a connect method")
return False
message = "self.client does not have a connect method"
logger.warning(message)
raise PoolError(code=PoolErrorCodes.INVALID_CLIENT_TYPE)
counter = 0 # we'll try 3 times
while True: