109,112c109,117
< h, w, hp, wp = struct.unpack('HHHH',
< fcntl.ioctl(0, termios.TIOCGWINSZ,
< struct.pack('HHHH', 0, 0, 0, 0)))
< return w, h
---
> try:
> h, w, hp, wp = struct.unpack('HHHH',
> fcntl.ioctl(0, termios.TIOCGWINSZ,
> struct.pack('HHHH', 0, 0, 0, 0)))
> return w, h
> except IOError:
> # It's possible that in sandboxed environments the above ioctl is not
> # allowed (e.g., some jenkins setups)
> return 80, 24
113a119
>