httppeer: declare 'dbg' at the function level
As we just saw in the previous changeset, having the variable defined into a
branch creates bug. This is a cheap to move it at the function level.
--- a/mercurial/httppeer.py Fri May 04 19:06:46 2018 +0200
+++ b/mercurial/httppeer.py Mon May 21 15:14:46 2018 +0200
@@ -277,9 +277,9 @@
Returns the response object.
"""
+ dbg = ui.debug
if (ui.debugflag
and ui.configbool('devel', 'debug.peer-request')):
- dbg = ui.debug
line = 'devel-peer-request: %s\n'
dbg(line % '%s %s' % (pycompat.bytesurl(req.get_method()),
pycompat.bytesurl(req.get_full_url())))