# HG changeset patch # User Augie Fackler # Date 2010-03-15 19:53:34 # Node ID 1b45468d3debdfe66625814939a4bf925d9a4dc8 # Parent ca6ba6cac6cd8adefdb537c448ec5ccde8f45a59 util.termwidth: check stderr first as it's least likely to be redirected diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1253,7 +1253,7 @@ def termwidth(): 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()