mercurial/hgweb/hgweb_mod.py
changeset 50928 d718eddf01d9
parent 50896 b2b8c25f9462
child 50929 18c8c18993f0
--- a/mercurial/hgweb/hgweb_mod.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Aug 31 23:56:15 2023 +0200
@@ -34,7 +34,6 @@
     templater,
     templateutil,
     ui as uimod,
-    util,
     wireprotoserver,
 )
 
@@ -403,7 +402,7 @@
                 cmd = cmd[style + 1 :]
 
             # avoid accepting e.g. style parameter as command
-            if util.safehasattr(webcommands, pycompat.sysstr(cmd)):
+            if hasattr(webcommands, pycompat.sysstr(cmd)):
                 req.qsparams[b'cmd'] = cmd
 
             if cmd == b'static':
@@ -478,7 +477,7 @@
 
         except (error.LookupError, error.RepoLookupError) as err:
             msg = pycompat.bytestr(err)
-            if util.safehasattr(err, 'name') and not isinstance(
+            if hasattr(err, 'name') and not isinstance(
                 err, error.ManifestLookupError
             ):
                 msg = b'revision not found: %s' % err.name