I’ve noticed following behavior:
os.dup2(tee.stdin.fileno(), sys.stdout.fileno())
os.dup2(tee.stdin.fileno(), sys.stderr.fileno())
Works fine when directly executed via python, but when command is issued via robot framework subprocess starts to yield an error:
XX.robot`
Traceback (most recent call last):
File “/usr/lib/python3.8/threading.py”, line 932, in _bootstrap_inner
self.run()
File “/home/tmp/Trace/TracieThread.py”, line 33, in run
os.dup2(tee.stdin.fileno(), sys.stdout.fileno())
io.UnsupportedOperation: fileno