mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 02:49:21 +02:00
Fix edge case on localhost
This commit is contained in:
parent
352a895d8d
commit
b663ac7b71
3 changed files with 7 additions and 2 deletions
|
@ -229,8 +229,9 @@ try:
|
||||||
# Initialize epplib
|
# Initialize epplib
|
||||||
CLIENT = EPPLibWrapper()
|
CLIENT = EPPLibWrapper()
|
||||||
logger.info("registry client initialized")
|
logger.info("registry client initialized")
|
||||||
except Exception:
|
except Exception as err:
|
||||||
CLIENT = None # type: ignore
|
CLIENT = None # type: ignore
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Unable to configure epplib. Registrar cannot contact registry.", exc_info=True
|
"Unable to configure epplib. Registrar cannot contact registry.", exc_info=True
|
||||||
)
|
)
|
||||||
|
logger.warning(err)
|
||||||
|
|
|
@ -60,6 +60,10 @@ class Socket:
|
||||||
sleep((counter * 50) / 1000) # sleep 50 ms to 150 ms
|
sleep((counter * 50) / 1000) # sleep 50 ms to 150 ms
|
||||||
else: # don't try again
|
else: # don't try again
|
||||||
return False
|
return False
|
||||||
|
# Occurs when an invalid creds are passed in - such as on localhost
|
||||||
|
except OSError as err:
|
||||||
|
logger.error(err)
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue