Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlogutils/debug.py @ 50951:d718eddf01d9
safehasattr: drop usage in favor of hasattr
The two functions should now be equivalent at least in their usage in core.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 31 Aug 2023 23:56:15 +0200 |
parents | 47b44d80d836 |
children | edc44ab7437a |
line wrap: on
line diff
--- a/mercurial/revlogutils/debug.py Thu Dec 08 15:33:19 2022 +0100 +++ b/mercurial/revlogutils/debug.py Thu Aug 31 23:56:15 2023 +0200 @@ -13,7 +13,6 @@ mdiff, node as nodemod, revlogutils, - util, ) from . import ( @@ -409,7 +408,7 @@ numother_nad += 1 # Obtain data on the raw chunks in the revlog. - if util.safehasattr(r, '_getsegmentforrevs'): + if hasattr(r, '_getsegmentforrevs'): segment = r._getsegmentforrevs(rev, rev)[1] else: segment = r._revlog._getsegmentforrevs(rev, rev)[1]