diff mercurial/streamclone.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 0452af304808
children 1b17eeba9deb
line wrap: on
line diff
--- a/mercurial/streamclone.py	Thu Dec 08 15:33:19 2022 +0100
+++ b/mercurial/streamclone.py	Thu Aug 31 23:56:15 2023 +0200
@@ -428,7 +428,7 @@
             with repo.svfs.backgroundclosing(repo.ui, expectedcount=filecount):
                 for i in range(filecount):
                     # XXX doesn't support '\n' or '\r' in filenames
-                    if util.safehasattr(fp, 'readline'):
+                    if hasattr(fp, 'readline'):
                         l = fp.readline()
                     else:
                         # inline clonebundles use a chunkbuffer, so no readline