From 6e557559fe816b24afae062e32c6011ef3c872aa Mon Sep 17 00:00:00 2001 From: azarnyx Date: Mon, 28 Jan 2019 20:44:01 +0100 Subject: [PATCH] Update worker.py (#12403) Fix an error reproduced with python3.6.8, python3.5.2, python2.7.12: $ echo "Hi!"| ./worker.py Traceback (most recent call last): File "./worker.py", line 6, in print("Processing " + sys.stdin.lines()) AttributeError: '_io.TextIOWrapper' object has no attribute 'lines' --- content/en/examples/application/job/rabbitmq/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/examples/application/job/rabbitmq/worker.py b/content/en/examples/application/job/rabbitmq/worker.py index a20884515d..88a7fcf96d 100644 --- a/content/en/examples/application/job/rabbitmq/worker.py +++ b/content/en/examples/application/job/rabbitmq/worker.py @@ -3,5 +3,5 @@ # Just prints standard out and sleeps for 10 seconds. import sys import time -print("Processing " + sys.stdin.lines()) +print("Processing " + sys.stdin.readlines()[0]) time.sleep(10)