Squelch ara initializing message from log
We share a python process, so we share loggers. Make sure we're not
picking up ara messages we're not interested in.
Change-Id: Ib1b4cf3e92deea03cd1d1fe3be9be3892a405669
diff --git a/zuul/ansible/callback/zuul_stream.py b/zuul/ansible/callback/zuul_stream.py
index 34d4406..1a006bc 100644
--- a/zuul/ansible/callback/zuul_stream.py
+++ b/zuul/ansible/callback/zuul_stream.py
@@ -114,6 +114,9 @@
else:
level = logging.INFO
logging.basicConfig(filename=path, level=level, format='%(message)s')
+ # Squelch logging from ara so we don't get the initializing message
+ logging.getLogger('ara').setLevel(logging.ERROR)
+
self._logger = logging.getLogger('zuul.executor.ansible')
def _log(self, msg, ts=None, job=True, executor=False, debug=False):
@@ -326,7 +329,7 @@
# We have a custom zuul module that doesn't want the parameters
# from its returned splatted to stdout. This is typically for
# modules that are collecting data to be displayed some other way.
- for key in result_dict.keys():
+ for key in list(result_dict.keys()):
if key != 'changed':
result_dict.pop(key)