tests: Remove a couple more py2 code paths
Change-Id: Ia754021714a8ed3d5d6010a946c558552821fbe4
This commit is contained in:
parent
747b2a4a32
commit
605c701235
@ -37,10 +37,6 @@ warnings.filterwarnings('ignore', message=(
|
||||
|
||||
import unittest
|
||||
|
||||
if sys.version_info < (3, 2):
|
||||
unittest.TestCase.assertRaisesRegex = unittest.TestCase.assertRaisesRegexp
|
||||
unittest.TestCase.assertRegex = unittest.TestCase.assertRegexpMatches
|
||||
|
||||
from eventlet.green import socket
|
||||
|
||||
from swift.common.utils import readconf
|
||||
|
@ -18,7 +18,7 @@ import io
|
||||
import json
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
import ssl
|
||||
import socket
|
||||
import time
|
||||
|
||||
@ -308,9 +308,7 @@ class Connection(object):
|
||||
return json.loads(self.response.read())
|
||||
|
||||
def http_connect(self):
|
||||
if self.storage_scheme == 'https' and \
|
||||
self.insecure and sys.version_info >= (2, 7, 9):
|
||||
import ssl
|
||||
if self.storage_scheme == 'https' and self.insecure:
|
||||
self.connection = self.conn_class(
|
||||
self.storage_netloc,
|
||||
context=ssl._create_unverified_context())
|
||||
|
Loading…
x
Reference in New Issue
Block a user