I have "child.interact()" in my code,it runs fine when run normally but when run as cronuser I get the following error..has anyone seen this before and know how to fix it?
child = pexpect.spawn('ectool --server=commander.company.com login username', logfile=sys.stdout)
child.expect('Password:')
child.sendline('password')
child.interact()
Error:-
File "/local/mnt/workspace/username/Automation/test.py", line 1453, in <module>
temp = prism.searchChangeRequestsForGerritInfo(PLProductLine)
File "/local/mnt/workspace/username/Automation/test.py", line 1094, in searchChangeRequestsForGerritInfo
lookaheadreset_link = lookaheadreset_ectool(gerrit_id)
File "/local/mnt/workspace/username/Automation/test.py", line 74, in lookaheadreset_ectool
child.interact()
File "/usr/local/lib/python2.7/dist-packages/pexpect/__init__.py", line 1612, in interact
mode = tty.tcgetattr(self.STDIN_FILENO)
termios.error: (22, 'Invalid argument')