Merge "Quiten boto logging in func tests"

This commit is contained in:
Zuul 2024-09-20 17:23:41 +00:00 committed by Gerrit Code Review
commit 94dc4cad09

View File

@ -45,11 +45,12 @@ class S3ApiBase(unittest.TestCase):
@contextmanager
def quiet_boto_logging(self):
original_level = logging.getLogger('boto').getEffectiveLevel()
try:
logging.getLogger('boto').setLevel(logging.INFO)
yield
finally:
logging.getLogger('boto').setLevel(logging.DEBUG)
logging.getLogger('boto').setLevel(original_level)
def setUp(self):
if not tf.config.get('s3_access_key'):