Skip to content

Commit

Permalink
Generally avoid sending None values to TLSConfig. Potentially prevent…
Browse files Browse the repository at this point in the history
…s similar errors in the future, assuming the users do not pass values in.
  • Loading branch information
felixfontein committed Dec 9, 2023
1 parent 3057358 commit e1886d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/module_utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def _get_tls_config(fail_function, **kwargs):
ssl_version=ssl_version,
)
)
# Filter out all None parameters
kwargs = {k: v for k, v in kwargs.items() if v is not None}
try:
tls_config = TLSConfig(**kwargs)
return tls_config
Expand Down

0 comments on commit e1886d1

Please sign in to comment.