Mercurial > hg
comparison hgext/pager.py @ 14945:11aad09a6370
hgext: replace uses of hasattr with util.safehasattr
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 20:37:12 -0500 |
parents | 76f295eaed86 |
children | 369741ef7253 |
comparison
equal
deleted
inserted
replaced
14944:e2c413bde8a5 | 14945:11aad09a6370 |
---|---|
56 import sys, os, signal, shlex, errno | 56 import sys, os, signal, shlex, errno |
57 from mercurial import commands, dispatch, util, extensions | 57 from mercurial import commands, dispatch, util, extensions |
58 from mercurial.i18n import _ | 58 from mercurial.i18n import _ |
59 | 59 |
60 def _runpager(p): | 60 def _runpager(p): |
61 if not hasattr(os, 'fork'): | 61 if not util.safehasattr(os, 'fork'): |
62 sys.stdout = util.popen(p, 'wb') | 62 sys.stdout = util.popen(p, 'wb') |
63 if util.isatty(sys.stderr): | 63 if util.isatty(sys.stderr): |
64 sys.stderr = sys.stdout | 64 sys.stderr = sys.stdout |
65 return | 65 return |
66 fdin, fdout = os.pipe() | 66 fdin, fdout = os.pipe() |