mercurial/httppeer.py
changeset 50928 d718eddf01d9
parent 50666 60f9602b413e
child 50929 18c8c18993f0
--- a/mercurial/httppeer.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/mercurial/httppeer.py	Thu Aug 31 23:56:15 2023 +0200
@@ -65,7 +65,7 @@
 class _multifile:
     def __init__(self, *fileobjs):
         for f in fileobjs:
-            if not util.safehasattr(f, 'length'):
+            if not hasattr(f, 'length'):
                 raise ValueError(
                     b'_multifile only supports file objects that '
                     b'have a length but this one does not:',
@@ -180,7 +180,7 @@
     qs = b'?%s' % urlreq.urlencode(q)
     cu = b"%s%s" % (repobaseurl, qs)
     size = 0
-    if util.safehasattr(data, 'length'):
+    if hasattr(data, 'length'):
         size = data.length
     elif data is not None:
         size = len(data)