comparison mercurial/url.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 bc9c9ed0659d
children ace0da86edd0
comparison
equal deleted inserted replaced
50927:7a8ea1397816 50928:d718eddf01d9
188 orgsend(self, data) 188 orgsend(self, data)
189 189
190 return _sendfile 190 return _sendfile
191 191
192 192
193 has_https = util.safehasattr(urlreq, 'httpshandler') 193 has_https = hasattr(urlreq, 'httpshandler')
194 194
195 195
196 class httpconnection(keepalive.HTTPConnection): 196 class httpconnection(keepalive.HTTPConnection):
197 # must be able to send big bundle as stream. 197 # must be able to send big bundle as stream.
198 send = _gen_sendfile(keepalive.HTTPConnection.send) 198 send = _gen_sendfile(keepalive.HTTPConnection.send)