Skip to content
Snippets Groups Projects
Commit 781b2b2b authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Exit ganeti-watcher cleanly when there's no configuration.

Reviewed-by: iustinp
parent a5bc662a
No related branches found
No related tags found
No related merge requests found
......@@ -457,7 +457,11 @@ def main():
sys.stderr = sys.stdout = open(constants.LOG_WATCHER, 'a')
try:
watcher = Watcher()
try:
watcher = Watcher()
except errors.ConfigurationError:
# Just exit if there's no configuration
sys.exit(constants.EXIT_SUCCESS)
watcher.Run()
watcher.WriteReport(sys.stdout)
except NotMasterError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment