httppeer: properly gate debug usage behind debug flag check
The "dbg" local variable is only defined if the 'debugflag' is set to True.
However, it was used indiscriminately later in the function. We hide its usage
behind the 'debugflag' value to avoid raising a NameError.
--- a/mercurial/httppeer.py Tue May 15 22:12:55 2018 +0900
+++ b/mercurial/httppeer.py Fri May 04 19:06:46 2018 +0200
@@ -319,7 +319,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))