$ timetra find -a sleep -f 'foooooooooooooooooooooooooooooooooooooooooooo' | head
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
foooooooooooooooooooooooooooooooooooooooooooo
Traceback (most recent call last):
File "/home/andy/src/timetra/bin/timetra", line 7, in <module>
main()
File "/home/andy/src/timetra/timetra/cli.py", line 172, in main
p.dispatch()
File "/usr/lib/python3.3/site-packages/argh/helpers.py", line 53, in dispatch
return dispatch(self, *args, **kwargs)
File "/usr/lib/python3.3/site-packages/argh/dispatching.py", line 128, in dispatch
io.dump(line, f)
File "/usr/lib/python3.3/site-packages/argh/io.py", line 101, in dump
output_file.write(data)
BrokenPipeError: [Errno 32] Broken pipe
When a (sufficiently long) line is written to an already closed stream, the BrokenPipeError is raised.
When the stream is closed, it is probably intentional. In the above case it is head that has closed the stream after getting 10 lines from argh. The exception should not be raised in this situation.
Observation
Cause
When a (sufficiently long) line is written to an already closed stream, the BrokenPipeError is raised.
Problem
When the stream is closed, it is probably intentional. In the above case it is
headthat has closed the stream after getting 10 lines fromargh. The exception should not be raised in this situation.Solution