# HG changeset patch # User David Soria Parra # Date 2012-05-12 07:43:12 # Node ID 2fdd1902ed2d0862afd51f956379b0effac4e884 # Parent 9e40bc4c1bdee81f41be17c20174a2aa168f0db7 pager: check if signal.SIGPIPE exists We have to check for signal.SIGPIPE before we attempt to set it. diff --git a/hgext/pager.py b/hgext/pager.py --- a/hgext/pager.py +++ b/hgext/pager.py @@ -85,10 +85,8 @@ def uisetup(ui): (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)