change to container.logs
This commit is contained in:
parent
c1ed8fdc68
commit
363c03ffa2
@ -29,7 +29,7 @@ docker = docker.from_env()
|
|||||||
|
|
||||||
container = docker.containers.run("rtl_433:inkbird", "-R 42 -R 187 -F json -T 40 -M time:utc:usec", devices={'/dev/bus/usb/001/004:/dev/bus/usb/001/004:rwm'}, remove=True)
|
container = docker.containers.run("rtl_433:inkbird", "-R 42 -R 187 -F json -T 40 -M time:utc:usec", devices={'/dev/bus/usb/001/004:/dev/bus/usb/001/004:rwm'}, remove=True)
|
||||||
|
|
||||||
for line in container.split('\n'):
|
for line in container.logs(stream=True):
|
||||||
|
|
||||||
print("line: " + line)
|
print("line: " + line)
|
||||||
print("line length: " + str(len(line)))
|
print("line length: " + str(len(line)))
|
||||||
|
Loading…
Reference in New Issue
Block a user