Skip to content

Commit

Permalink
Add sys.exit(1) to both sender and reciever
Browse files Browse the repository at this point in the history
Return 1 instead of 0 when failing due to an exception
  • Loading branch information
RoseECooper committed Sep 18, 2023
1 parent 0ec0b31 commit 3f8df9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ssm/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def run_sender(protocol, brokers, project, token, cp, log):
print('SSM failed to complete successfully. See log file for details.')
log.error('Unexpected exception in SSM: %s', e)
log.error('Exception type: %s', e.__class__)
sys.exit(1)

try:
sender.close_connection()
Expand Down Expand Up @@ -350,6 +351,7 @@ def run_receiver(protocol, brokers, project, token, cp, log, dn_file):
log.error('The SSM will exit.')
ssm.shutdown()
dc.close()
sys.exit(1)

log.info('Receiving SSM has shut down.')
log.info(LOG_BREAK)
Expand Down

0 comments on commit 3f8df9e

Please sign in to comment.