Added check for invalid creds

Without the added check, the script will error out on line 29 since the key doesn't exist in the dict.  This at least gives a reason.
pull/749/head
Nick 2021-02-17 12:07:11 -05:00 committed by Raphaël Vinot
parent e183dbc577
commit 25e44e7d8d
1 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,9 @@ headers = {
}
responseSiem = requests.request("GET", urlSiem, headers=headers, params=queryString)
if 'Credentials authentication failed' in str(responseSiem.text):
print("Credentials invalid, please edit keys.py and try again")
quit()
jsonDataSiem = json.loads(responseSiem.text)