equal
deleted
inserted
replaced
314 except AttributeError: |
314 except AttributeError: |
315 continue |
315 continue |
316 if not os.isatty(fd): |
316 if not os.isatty(fd): |
317 continue |
317 continue |
318 arri = fcntl.ioctl(fd, termios.TIOCGWINSZ, '\0' * 8) |
318 arri = fcntl.ioctl(fd, termios.TIOCGWINSZ, '\0' * 8) |
319 return array.array('h', arri)[1] |
319 width = array.array('h', arri)[1] |
|
320 if width > 0: |
|
321 return width |
320 except ValueError: |
322 except ValueError: |
321 pass |
323 pass |
322 except IOError, e: |
324 except IOError, e: |
323 if e[0] == errno.EINVAL: |
325 if e[0] == errno.EINVAL: |
324 pass |
326 pass |