--- 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)