Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Utilize sys.exit in configcheck #3481

Merged
merged 4 commits into from
Aug 21, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions utils/configcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# std
import glob
import os
import sys

# project
from config import (
Expand All @@ -30,11 +31,13 @@ def configcheck():
print "%s is valid" % basename
if all_valid:
print "All yaml files passed. You can now run the Datadog agent."
sys.exit(0)
return 0
else:
print("Fix the invalid yaml files above in order to start the Datadog agent. "
"A useful external tool for yaml parsing can be found at "
"http://yaml-online-parser.appspot.com/")
sys.exit(1)
return 1


Expand Down