##// END OF EJS Templates
posix: workaround lack of TIOCGWINSZ on Irix (issue3449)...
Mark Round -
r16726:7002bb17 stable
parent child Browse files
Show More
@@ -409,10 +409,13 b' def termwidth():'
409 continue
409 continue
410 if not os.isatty(fd):
410 if not os.isatty(fd):
411 continue
411 continue
412 arri = fcntl.ioctl(fd, termios.TIOCGWINSZ, '\0' * 8)
412 try:
413 width = array.array('h', arri)[1]
413 arri = fcntl.ioctl(fd, termios.TIOCGWINSZ, '\0' * 8)
414 if width > 0:
414 width = array.array('h', arri)[1]
415 return width
415 if width > 0:
416 return width
417 except AttributeError:
418 pass
416 except ValueError:
419 except ValueError:
417 pass
420 pass
418 except IOError, e:
421 except IOError, e:
General Comments 0
You need to be logged in to leave comments. Login now