Mercurial > public > mercurial-scm > hg
comparison mercurial/keepalive.py @ 43103:c95b2f40db7c
py3: stop normalizing 2nd argument of *attr() to unicode
Now that we don't byteify strings, we can stop normalizing the 2nd
string argument to getattr() and remove explicit overrides we were
using in the code base.
We no longer use some helper functions in the source transformer,
so we remove those as well.
Differential Revision: https://phab.mercurial-scm.org/D7012
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 06 Oct 2019 17:45:05 -0400 |
parents | c59eb1560c44 |
children | d783f945a701 |
comparison
equal
deleted
inserted
replaced
43102:829088e87032 | 43103:c95b2f40db7c |
---|---|
253 raise urlerr.urlerror(err) | 253 raise urlerr.urlerror(err) |
254 | 254 |
255 # If not a persistent connection, don't try to reuse it. Look | 255 # If not a persistent connection, don't try to reuse it. Look |
256 # for this using getattr() since vcr doesn't define this | 256 # for this using getattr() since vcr doesn't define this |
257 # attribute, and in that case always close the connection. | 257 # attribute, and in that case always close the connection. |
258 if getattr(r, r'will_close', True): | 258 if getattr(r, 'will_close', True): |
259 self._cm.remove(h) | 259 self._cm.remove(h) |
260 | 260 |
261 if DEBUG: | 261 if DEBUG: |
262 DEBUG.info(b"STATUS: %s, %s", r.status, r.reason) | 262 DEBUG.info(b"STATUS: %s, %s", r.status, r.reason) |
263 r._handler = self | 263 r._handler = self |