Mercurial > hg
comparison hgext/remotefilelog/basestore.py @ 50928: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 | 2e726c934fcd |
children | 1625fe807c04 |
comparison
equal
deleted
inserted
replaced
50927:7a8ea1397816 | 50928:d718eddf01d9 |
---|---|
413 # exhausted. | 413 # exhausted. |
414 self.retrylog = kwargs.get('retrylog', None) | 414 self.retrylog = kwargs.get('retrylog', None) |
415 | 415 |
416 def markforrefresh(self): | 416 def markforrefresh(self): |
417 for store in self.stores: | 417 for store in self.stores: |
418 if util.safehasattr(store, b'markforrefresh'): | 418 if hasattr(store, b'markforrefresh'): |
419 store.markforrefresh() | 419 store.markforrefresh() |
420 | 420 |
421 @staticmethod | 421 @staticmethod |
422 def retriable(fn): | 422 def retriable(fn): |
423 def noop(*args): | 423 def noop(*args): |