summaryrefslogtreecommitdiff
path: root/pexpect/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pexpect/__init__.py')
-rw-r--r--pexpect/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py
index d23d8ab..6397a5f 100644
--- a/pexpect/__init__.py
+++ b/pexpect/__init__.py
@@ -1555,7 +1555,7 @@ class spawn(object):
TIOCGWINSZ = getattr(termios, 'TIOCGWINSZ', 1074295912)
s = struct.pack('HHHH', 0, 0, 0, 0)
- x = fcntl.ioctl(self.fileno(), TIOCGWINSZ, s)
+ x = fcntl.ioctl(self.child_fd, TIOCGWINSZ, s)
return struct.unpack('HHHH', x)[0:2]
def setwinsize(self, rows, cols):