Use baseexception

main
Bob Mottram 2024-02-06 22:12:07 +00:00
parent cf5831e20b
commit 4ba94563fa
1 changed files with 3 additions and 3 deletions

View File

@ -2820,7 +2820,7 @@ def thread_send_post(session, post_json_str: str, federation_list: [],
if debug: if debug:
print('Obtained post_json_string for ' + inbox_url + print('Obtained post_json_string for ' + inbox_url +
' unauthorized: ' + str(unauthorized)) ' unauthorized: ' + str(unauthorized))
except Exception as ex: except BaseException as ex:
print('ERROR: post_json_string failed ' + str(ex)) print('ERROR: post_json_string failed ' + str(ex))
if unauthorized: if unauthorized:
@ -2842,7 +2842,7 @@ def thread_send_post(session, post_json_str: str, federation_list: [],
if debug: if debug:
print('Obtained ld post_json_string for ' + inbox_url + print('Obtained ld post_json_string for ' + inbox_url +
' unauthorized: ' + str(unauthorized)) ' unauthorized: ' + str(unauthorized))
except Exception as ex: except BaseException as ex:
print('ERROR: ld post_json_string failed ' + str(ex)) print('ERROR: ld post_json_string failed ' + str(ex))
if unauthorized: if unauthorized:
@ -3039,7 +3039,7 @@ def send_post(signing_priv_key_pem: str, project_version: str,
signed_post_json_object = post_json_object.copy() signed_post_json_object = post_json_object.copy()
generate_json_signature(signed_post_json_object, private_key_pem) generate_json_signature(signed_post_json_object, private_key_pem)
post_json_object = signed_post_json_object post_json_object = signed_post_json_object
except Exception as ex: except BaseException as ex:
print('WARN: send_post failed to JSON-LD sign post, ' + str(ex)) print('WARN: send_post failed to JSON-LD sign post, ' + str(ex))
pprint(signed_post_json_object) pprint(signed_post_json_object)