changeset 13286:189edd1b15fb

merge with stable
author Steve Borho <steve@borho.org>
date Sat, 22 Jan 2011 09:13:04 -0600
parents 77351c88dd10 (current diff) 2ef915184ff2 (diff)
children 9c3bfba3f48d
files
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/win32.py	Fri Jan 21 16:26:01 2011 -0600
+++ b/mercurial/win32.py	Sat Jan 22 09:13:04 2011 -0600
@@ -170,6 +170,8 @@
     try:
         # Query stderr to avoid problems with redirections
         screenbuf = win32console.GetStdHandle(win32console.STD_ERROR_HANDLE)
+        if screenbuf is None:
+            return 79
         try:
             window = screenbuf.GetConsoleScreenBufferInfo()['Window']
             width = window.Right - window.Left