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/700/head
Nick 2021-02-17 12:07:11 -05:00
parent d0a050263e
commit 694c4b72ee
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)