Skip to content

Commit

Permalink
Change exit() to sys.exit()
Browse files Browse the repository at this point in the history
The "exit()" function is from site.py which may not be present depending
on command line options. "sys.exit" on the other hand, will be there as
it is imported.
  • Loading branch information
tofu-rocketry committed May 21, 2024
1 parent 0e8592b commit 6f008a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main():
cp.read(options.config)
else:
print("Config file not found at", options.config)
exit(1)
sys.exit(1)

# Check for pidfile
pidfile = cp.get('daemon', 'pidfile')
Expand Down
3 changes: 2 additions & 1 deletion bin/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import logging
from optparse import OptionParser
import os
import sys

try:
import ConfigParser
Expand Down Expand Up @@ -57,7 +58,7 @@ def main():
cp.read(options.config)
else:
print("Config file not found at", options.config)
exit(1)
sys.exit(1)

ssm.agents.logging_helper(cp)

Expand Down

0 comments on commit 6f008a2

Please sign in to comment.