mercurial/httppeer.py
changeset 38239 ead71b15efd5
parent 38164 aac4be30e250
parent 38033 13b2812cff2b
child 38502 2279d90eed9a
--- a/mercurial/httppeer.py	Sat May 26 03:01:14 2018 +0530
+++ b/mercurial/httppeer.py	Wed Jun 06 13:31:24 2018 -0400
@@ -276,9 +276,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())))
@@ -318,7 +318,7 @@
         ui.traceback()
         raise IOError(None, inst)
     finally:
-        if ui.configbool('devel', 'debug.peer-request'):
+        if ui.debugflag and ui.configbool('devel', 'debug.peer-request'):
             dbg(line % '  finished in %.4f seconds (%d)'
                 % (util.timer() - start, res.code))