Allow retries on 404

main2
Bob Mottram 2019-10-23 19:45:16 +01:00
parent 21ce09e192
commit fc1942ba4d
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ def postJsonString(session,postJsonStr: str, \
# postResult = session.post(url = inboxUrl, data = postJsonStr, headers=headers) # postResult = session.post(url = inboxUrl, data = postJsonStr, headers=headers)
# if not (postResult.status_code<200 or postResult.status_code>202): # if not (postResult.status_code<200 or postResult.status_code>202):
# return True # return True
if postResult.status_code>=400 and postResult.status_code<=405: if postResult.status_code>=400 and postResult.status_code<=405 and postResult.status_code!=404:
print('WARN: >>> Post to '+inboxUrl+' is unauthorized <<<') print('WARN: >>> Post to '+inboxUrl+' is unauthorized <<<')
return False,True return False,True
else: else: