# HG changeset patch # User Matt Mackall # Date 2009-10-03 20:57:48 # Node ID effa05849027f2759c812dfd37d3cfafe0d605e0 # Parent e3ce0c30798b911660d397cd5b07c8bc39297556 Fix for issue1848 diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1270,6 +1270,11 @@ def termwidth(): return array.array('h', arri)[1] except ValueError: pass + except IOError, e: + if e[0] == errno.EINVAL: + pass + else: + raise except ImportError: pass return 80