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 <module>
    print("Processing " + sys.stdin.lines())
AttributeError: '_io.TextIOWrapper' object has no attribute 'lines'
pull/12414/head
azarnyx 2019-01-28 20:44:01 +01:00 committed by Kubernetes Prow Robot
parent 431c1f3922
commit 6e557559fe
1 changed files with 1 additions and 1 deletions

View File

@ -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)