Skip to content

Commit

Permalink
Move comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusbv committed May 14, 2024
1 parent f0310d7 commit 629fad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cloudregister/smt.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def __init__(self, smtXMLNode, https_only=False):
if https_only:
self._protocol = 'https'
self._check_urls = self._form_srv_check_urls()
# disable InsecureRequestWarning
# as verification is disabled for the https request
requests.packages.urllib3.disable_warnings(
requests.packages.urllib3.exceptions.InsecureRequestWarning
)
Expand Down Expand Up @@ -153,8 +155,6 @@ def is_responsive(self):
# to know if the system is responsive we ignore cert validation
# Using the IP address protects us from hostname spoofing

# disable InsecureRequestWarning
# as verification is disabled for the https request
for health_url in self._check_urls.keys():
try:
response = requests.get(health_url, timeout=2, verify=False)
Expand Down

0 comments on commit 629fad6

Please sign in to comment.