changeset 51739:78f789a4c8a2

httppeer: move a variable to avoid a bad reference before assignment warning No actual bug here, because the conditional used to assign is the same as the conditional in the `finally` block that guards the reference.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 26 Jul 2024 21:59:34 -0400
parents d17578f96e60
children 7226f2626fb1
files mercurial/httppeer.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httppeer.py	Fri Jul 26 21:54:07 2024 -0400
+++ b/mercurial/httppeer.py	Fri Jul 26 21:59:34 2024 -0400
@@ -245,8 +245,9 @@
     Returns the response object.
     """
     dbg = ui.debug
+    line = b'devel-peer-request: %s\n'
+
     if ui.debugflag and ui.configbool(b'devel', b'debug.peer-request'):
-        line = b'devel-peer-request: %s\n'
         dbg(
             line
             % b'%s %s'