pager: check if signal.SIGPIPE exists
We have to check for signal.SIGPIPE before we attempt
to set it.
--- 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)