Commit 3f17ef02 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

burner: Trivial code cleanup



- Use constant for exit value
- Configure logging from main function, not from class' “__init__”
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent ddfde77e
......@@ -258,7 +258,6 @@ class Burner(object):
def __init__(self):
"""Constructor."""
utils.SetupLogging(constants.LOG_BURNIN, debug=False, stderr_logging=True)
self.url_opener = SimpleOpener()
self._feed_buf = StringIO()
self.nodes = []
......@@ -1065,14 +1064,16 @@ class Burner(object):
else: # non-expected error
raise
return 0
return constants.EXIT_SUCCESS
def main():
"""Main function"""
"""Main function.
burner = Burner()
return burner.BurninCluster()
"""
utils.SetupLogging(constants.LOG_BURNIN, debug=False, stderr_logging=True)
return Burner().BurninCluster()
if __name__ == "__main__":
......
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