comparison mercurial/hgweb/webutil.py @ 50925: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 98b8836d0e82
children 18c8c18993f0
comparison
equal deleted inserted replaced
50924:7a8ea1397816 50925:d718eddf01d9
209 b'user': s.user(), 209 b'user': s.user(),
210 b'date': s.date(), 210 b'date': s.date(),
211 b'description': s.description(), 211 b'description': s.description(),
212 b'branch': s.branch(), 212 b'branch': s.branch(),
213 } 213 }
214 if util.safehasattr(s, 'path'): 214 if hasattr(s, 'path'):
215 d[b'file'] = s.path() 215 d[b'file'] = s.path()
216 yield d 216 yield d
217 217
218 218
219 def _siblings(siblings=None, hiderev=None): 219 def _siblings(siblings=None, hiderev=None):