Skip to content

Commit

Permalink
Set okta_api_key to None when not configured. Corrected the log for C…
Browse files Browse the repository at this point in the history
…RXcavator (#293)
  • Loading branch information
kledo-lyft committed Apr 29, 2020
1 parent 970ab87 commit 68abae2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cartography/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,12 @@ def main(self, argv):
if config.okta_org_id and config.okta_api_key_env_var:
logger.debug(f"Reading API key for Okta from environment variable {config.okta_api_key_env_var}")
config.okta_api_key = os.environ.get(config.okta_api_key_env_var)
else:
config.okta_api_key = None

# CRXcavator config
if config.crxcavator_api_base_uri and config.crxcavator_api_key_env_var:
logger.debug("Reading API key for CRXcavator from environment variable '%s'.")
logger.debug(f"Reading API key for CRXcavator from env variable {config.crxcavator_api_key_env_var}.")
config.crxcavator_api_key = os.environ.get(config.crxcavator_api_key_env_var)
else:
config.crxcavator_api_key = None
Expand Down

0 comments on commit 68abae2

Please sign in to comment.