mercurial/util.py
branchstable
changeset 10789 1b45468d3deb
parent 10487 7a6b5f85c3ab
child 10790 ef3668450cd0
child 10896 2d61b612a09d
equal deleted inserted replaced
10788:ca6ba6cac6cd 10789:1b45468d3deb
  1251             return int(os.environ['COLUMNS'])
  1251             return int(os.environ['COLUMNS'])
  1252         except ValueError:
  1252         except ValueError:
  1253             pass
  1253             pass
  1254     try:
  1254     try:
  1255         import termios, array, fcntl
  1255         import termios, array, fcntl
  1256         for dev in (sys.stdout, sys.stdin):
  1256         for dev in (sys.stderr, sys.stdout, sys.stdin):
  1257             try:
  1257             try:
  1258                 try:
  1258                 try:
  1259                     fd = dev.fileno()
  1259                     fd = dev.fileno()
  1260                 except AttributeError:
  1260                 except AttributeError:
  1261                     continue
  1261                     continue