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
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment