mercurial/scmposix.py
changeset 43506 9f70512ae2cf
parent 43480 667f56d73ceb
child 45824 9ac96b9fa76e
equal deleted inserted replaced
43505:47fac1692ede 43506:9f70512ae2cf
    82             except AttributeError:
    82             except AttributeError:
    83                 continue
    83                 continue
    84             if not os.isatty(fd):
    84             if not os.isatty(fd):
    85                 continue
    85                 continue
    86             arri = fcntl.ioctl(fd, TIOCGWINSZ, b'\0' * 8)
    86             arri = fcntl.ioctl(fd, TIOCGWINSZ, b'\0' * 8)
    87             height, width = array.array(r'h', arri)[:2]
    87             height, width = array.array('h', arri)[:2]
    88             if width > 0 and height > 0:
    88             if width > 0 and height > 0:
    89                 return width, height
    89                 return width, height
    90         except ValueError:
    90         except ValueError:
    91             pass
    91             pass
    92         except IOError as e:
    92         except IOError as e: