diff contrib/benchmarks/__init__.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 6000f5b25c9b
children dc36535a5edc
line wrap: on
line diff
--- a/contrib/benchmarks/__init__.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/contrib/benchmarks/__init__.py	Thu Aug 31 23:56:15 2023 +0200
@@ -40,7 +40,6 @@
     extensions,
     hg,
     ui as uimod,
-    util,
 )
 
 basedir = os.path.abspath(
@@ -66,7 +65,7 @@
     os.environ["HGRCPATH"] = os.environ.get("ASVHGRCPATH", "")
     # for "historical portability"
     # ui.load() has been available since d83ca85
-    if util.safehasattr(uimod.ui, "load"):
+    if hasattr(uimod.ui, "load"):
         ui = uimod.ui.load()
     else:
         ui = uimod.ui()