Private
Public Access
1
0

more logging

This commit is contained in:
Sander Roosendaal
2021-02-03 18:23:13 +01:00
parent 9aaa22b423
commit 19becfb592

View File

@@ -22,10 +22,13 @@ headers = {
def get_contacts(rower):
res = requests.get(contacts_url, auth=auth, headers=headers)
url = contacts_search_url+'?query='+str(rower.user.email)
with open('braintreewebhooks.log','a') as f:
f.write('Searching Contact url :'+str(url)+'\n')
res = requests.get(url, auth=auth, headers=headers)
with open('braintreewebhooks.log','a') as f:
f.write('Searching Contact Status code'+str(res.status_code)+'\n')
f.write('Searching Contact Status code '+str(res.status_code)+'\n')
if res.status_code != 200:
return None