mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
stop using urllib2 in test farm tests
This commit is contained in:
parent
dbda499b08
commit
3e5cfae06b
1 changed files with 5 additions and 4 deletions
|
|
@ -40,7 +40,8 @@ import socket
|
|||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import urllib2
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
|
|
@ -203,11 +204,11 @@ def block_until_http_ready(urlstring, wait_time=10, timeout=240):
|
|||
try:
|
||||
sys.stdout.write('.')
|
||||
sys.stdout.flush()
|
||||
req = urllib2.Request(urlstring)
|
||||
response = urllib2.urlopen(req)
|
||||
req = urllib.request.Request(urlstring)
|
||||
response = urllib.request.urlopen(req)
|
||||
#if response.code == 200:
|
||||
server_ready = True
|
||||
except urllib2.URLError:
|
||||
except urllib.error.URLError:
|
||||
pass
|
||||
time.sleep(wait_time)
|
||||
t_elapsed += wait_time
|
||||
|
|
|
|||
Loading…
Reference in a new issue