Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.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 | 2264e775512b |
children | 493034cc3265 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Thu Dec 08 15:33:19 2022 +0100 +++ b/mercurial/subrepo.py Thu Aug 31 23:56:15 2023 +0200 @@ -1136,7 +1136,7 @@ # --non-interactive. if commands[0] in (b'update', b'checkout', b'commit'): cmd.append(b'--non-interactive') - if util.safehasattr(subprocess, 'CREATE_NO_WINDOW'): + if hasattr(subprocess, 'CREATE_NO_WINDOW'): # On Windows, prevent command prompts windows from popping up when # running in pythonw. extrakw['creationflags'] = getattr(subprocess, 'CREATE_NO_WINDOW') @@ -1511,7 +1511,7 @@ # the end of git diff arguments is used for paths commands.insert(1, b'--color') extrakw = {} - if util.safehasattr(subprocess, 'CREATE_NO_WINDOW'): + if hasattr(subprocess, 'CREATE_NO_WINDOW'): # On Windows, prevent command prompts windows from popping up when # running in pythonw. extrakw['creationflags'] = getattr(subprocess, 'CREATE_NO_WINDOW')