Skip to content

Commit 5c828bd

Browse files
committed
Updated config validator func to check for None values
Signed-off-by: Rahman Mousavian <[email protected]>
1 parent 9555623 commit 5c828bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oci/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def validate_config(config, **kwargs):
111111
errors = {}
112112
for required_key in REQUIRED:
113113
fallback_key = REQUIRED_FALLBACKS.get(required_key)
114-
if required_key not in config and fallback_key not in config:
114+
if (required_key not in config or config[required_key] is None) and (fallback_key not in config or config[fallback_key] is None):
115115
# If region is not provided, check the env variable
116116
if required_key == REGION_KEY_NAME:
117117
logger.debug("Region not found in config, checking environment variable {}".format(REGION_ENV_VAR_NAME))

0 commit comments

Comments
 (0)