# HG changeset patch # User Steve Borho # Date 1295709184 21600 # Node ID 189edd1b15fbcba4ddb3d828fe0f10d69d17bba5 # Parent 77351c88dd1098476c587d8fbf535963c42f809e# Parent 2ef915184ff297e38e342397433440ea02abdec6 merge with stable diff -r 77351c88dd10 -r 189edd1b15fb mercurial/win32.py --- 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