#35 Fail on Solaris 10 using crontab due tty not existent

v1.0 (example)
closed-fixed
5
2014-03-07
2013-08-23
No

Hi,

I just found it fails on Solaris 10, once using via crontab.

Traceback (most recent call last):
File "/export/home/sdpuser/NPCverify/Get_NPC_files.py", line 48, in <module>
exp = pexpect.spawn("/usr/bin/bash")
File "/export/home/sdpuser/NPCverify/pexpect.py", line 429, in init
self._spawn (command, args)
File "/export/home/sdpuser/NPCverify/pexpect.py", line 531, in _spawn
self.pid, self.child_fd = self.fork_pty()
File "/export/home/sdpuser/NPCverify/pexpect.py", line 592, in
fork_pty
self.pty_make_controlling_tty(child_fd)
File "/export/home/sdpuser/NPCverify/pexpect.py", line 615, in
pty_make_controlling_tty
fd = os.open("/dev/tty", os.O_RDWR | os.O_NOCTTY);
OSError: [Errno 6] No such device or address: '/dev/tty'

I checked code and saw a possible patch to fix it. I tested in Solaris and Linux (Ubuntu) and it seems to be working accordingly.

Patch follows attached.

1 Attachments

Discussion

  • Thomas Kluyver

    Thomas Kluyver - 2014-03-07
    • status: open --> closed-fixed
     
  • Thomas Kluyver

    Thomas Kluyver - 2014-03-07

    Looks like this patch was accepted. Closing.

     

Log in to post a comment.