changeset 38033:13b2812cff2b stable

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.
author Boris Feld <boris.feld@octobus.net>
date Mon, 21 May 2018 15:14:46 +0200
parents f9dc1d5b676b
children d46a38c07b1a
files mercurial/httppeer.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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())))