From 3e5cfae06be9d1ea50f7ae98ea0c18c9f17dc2d6 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 31 Mar 2020 15:12:09 -0700 Subject: [PATCH] stop using urllib2 in test farm tests --- tests/letstest/multitester.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/letstest/multitester.py b/tests/letstest/multitester.py index 9ea9fe76b..3ccc61754 100644 --- a/tests/letstest/multitester.py +++ b/tests/letstest/multitester.py @@ -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