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 comman 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 e3f5c81 commit 91f3c7c
Show file tree
Hide file tree
Showing 2 changed files with 2 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 warning on line 69 in bin/receiver.py

View check run for this annotation

Codecov / codecov/patch

bin/receiver.py#L69

Added line #L69 was not covered by tests

# Check for pidfile
pidfile = cp.get('daemon', 'pidfile')
Expand Down
2 changes: 1 addition & 1 deletion bin/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def main():
cp.read(options.config)
else:
print("Config file not found at", options.config)
exit(1)
sys.exit(1)

Check warning on line 60 in bin/sender.py

View check run for this annotation

Codecov / codecov/patch

bin/sender.py#L60

Added line #L60 was not covered by tests

ssm.agents.logging_helper(cp)

Expand Down

0 comments on commit 91f3c7c

Please sign in to comment.