-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Don't open a file in Python without closing it. This code is bad mojo:
app = msal.ConfidentialClientApplication(
config["client_id"], authority=config["authority"],
client_credential={"thumbprint": config["thumbprint"], "private_key": open(config['private_key_file']).read()},
)
Prefer:
with open(config['private_key_file']) as f:
key = f.read()
app = msal.ConfidentialClientApplication(
config["client_id"], authority=config["authority"],
client_credential={"thumbprint": config["thumbprint"], "private_key": key },
)
hvbtup
Metadata
Metadata
Assignees
Labels
No labels