Skip to content

Commit aa96497

Browse files
Merge pull request #20 from lyft/ramonpetgrave64-default-config-params
fix: don't set Config params when None
2 parents 791c332 + 8070859 commit aa96497

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

kmsauth/services.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ def get_boto_client(
3939
logging.error("Failed to get {0} client.".format(client))
4040
return None
4141

42+
# do not explicitly set any params as None
43+
config_params = dict(
44+
max_pool_connections=max_pool_connections,
45+
connect_timeout=connect_timeout,
46+
read_timeout=read_timeout,
47+
)
48+
config_params = {k: v for (k, v) in config_params.items() if v is not None}
4249
CLIENT_CACHE[cache_key] = session.client(
4350
client,
4451
endpoint_url=endpoint_url,
45-
config=botocore.config.Config(
46-
max_pool_connections=max_pool_connections,
47-
connect_timeout=connect_timeout,
48-
read_timeout=read_timeout,
49-
)
52+
config=botocore.config.Config(**config_params)
5053
)
5154
return CLIENT_CACHE[cache_key]
5255

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from setuptools import setup, find_packages
1515

16-
VERSION = "0.6.2"
16+
VERSION = "0.6.3"
1717

1818
requirements = [
1919
# Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK)

0 commit comments

Comments
 (0)