summaryrefslogtreecommitdiff
path: root/zuul
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-09-18 15:17:49 +0000
committerGerrit Code Review <review@openstack.org>2019-09-18 15:17:49 +0000
commitb7d326ffd857d8d936e54cd7fea0b6436794c54d (patch)
tree55f114bd9b7a0a99b1055d879fc3c4ff1460cf80 /zuul
parent3c2b5c6ed2dd772d4d9e11d291abdf7710356867 (diff)
parent9462c9e466e3c42143541775102a144d4f732a06 (diff)
downloadzuul-b7d326ffd857d8d936e54cd7fea0b6436794c54d.tar.gz
Merge "zuul_console: fix python 3 support"
Diffstat (limited to 'zuul')
-rwxr-xr-xzuul/ansible/base/library/zuul_console.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/zuul/ansible/base/library/zuul_console.py b/zuul/ansible/base/library/zuul_console.py
index 6f988e682..9dffbbc3a 100755
--- a/zuul/ansible/base/library/zuul_console.py
+++ b/zuul/ansible/base/library/zuul_console.py
@@ -185,7 +185,7 @@ class Server(object):
console = self.chunkConsole(conn, log_uuid)
if console:
break
- conn.send('[Zuul] Log not found\n')
+ conn.send(b'[Zuul] Log not found\n')
time.sleep(0.5)
while True:
if self.followConsole(console, conn):
@@ -307,6 +307,19 @@ def main():
from ansible.module_utils.basic import * # noqa
from ansible.module_utils.basic import AnsibleModule
+#
+# To debug this, you can run it with arguments specified on the
+# command-line in a json file. e.g.
+#
+# $ cat args.json
+# {"ANSIBLE_MODULE_ARGS": {
+# "state": "present"
+# }
+# }
+#
+# Then from a virtualenv with Ansible installed you can run
+#
+# $ ./ansible-env/bin/python ./zuul_console.py args.json
+#
if __name__ == '__main__':
main()
-# test()