# HG changeset patch # User Augie Fackler # Date 2011-07-25 21:02:27 # Node ID 0588fb0e2e8dfa4ddff6df91f496a3cb06db3676 # Parent 194b043dfa51b9b14460c24d5cb9899562dc6f62 patch: use safehasattr instead of hasattr diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -126,7 +126,7 @@ def split(stream): mimeheaders = ['content-type'] - if not hasattr(stream, 'next'): + if not util.safehasattr(stream, 'next'): # http responses, for example, have readline but not next stream = fiter(stream)