Mercurial > public > mercurial-scm > hg
diff hgext/pager.py @ 16652:2fdd1902ed2d stable
pager: check if signal.SIGPIPE exists
We have to check for signal.SIGPIPE before we attempt
to set it.
author | David Soria Parra <dsp@php.net> |
---|---|
date | Sat, 12 May 2012 09:43:12 +0200 |
parents | 0c0c1101e46d |
children | 38caf405d010 |
line wrap: on
line diff
--- a/hgext/pager.py Sat May 12 10:02:47 2012 +0200 +++ b/hgext/pager.py Sat May 12 09:43:12 2012 +0200 @@ -85,10 +85,8 @@ (cmd not in ui.configlist('pager', 'ignore') and not attend))): ui.setconfig('ui', 'formatted', ui.formatted()) ui.setconfig('ui', 'interactive', False) - try: + if util.safehasattr(signal, "SIGPIPE"): signal.signal(signal.SIGPIPE, signal.SIG_DFL) - except ValueError: - pass _runpager(p) return orig(ui, options, cmd, cmdfunc)