mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 07:42:08 -04:00
use six for urllib instead
This commit is contained in:
parent
3e5cfae06b
commit
2f8ae1dae8
1 changed files with 5 additions and 5 deletions
|
|
@ -40,11 +40,11 @@ import socket
|
|||
import sys
|
||||
import time
|
||||
import traceback
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
|
||||
import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
from six.moves.urllib import error as urllib_error
|
||||
from six.moves.urllib import request as urllib_request
|
||||
import yaml
|
||||
|
||||
import fabric
|
||||
|
|
@ -204,11 +204,11 @@ def block_until_http_ready(urlstring, wait_time=10, timeout=240):
|
|||
try:
|
||||
sys.stdout.write('.')
|
||||
sys.stdout.flush()
|
||||
req = urllib.request.Request(urlstring)
|
||||
response = urllib.request.urlopen(req)
|
||||
req = urllib_request.Request(urlstring)
|
||||
response = urllib_request.urlopen(req)
|
||||
#if response.code == 200:
|
||||
server_ready = True
|
||||
except urllib.error.URLError:
|
||||
except urllib_error.URLError:
|
||||
pass
|
||||
time.sleep(wait_time)
|
||||
t_elapsed += wait_time
|
||||
|
|
|
|||
Loading…
Reference in a new issue