util.termwidth: check stderr first as it's least likely to be redirected stable
authorAugie Fackler <durin42@gmail.com>
Mon, 15 Mar 2010 14:53:34 -0500
branchstable
changeset 10789 1b45468d3deb
parent 10788 ca6ba6cac6cd
child 10790 ef3668450cd0
child 10791 48c8eb9de0c8
child 10803 23ff2a92cc9d
util.termwidth: check stderr first as it's least likely to be redirected
mercurial/util.py
--- a/mercurial/util.py	Mon Mar 29 16:44:24 2010 -0500
+++ b/mercurial/util.py	Mon Mar 15 14:53:34 2010 -0500
@@ -1253,7 +1253,7 @@
             pass
     try:
         import termios, array, fcntl
-        for dev in (sys.stdout, sys.stdin):
+        for dev in (sys.stderr, sys.stdout, sys.stdin):
             try:
                 try:
                     fd = dev.fileno()