httppeer: move a variable to avoid a bad reference before assignment warning
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 26 Jul 2024 21:59:34 -0400
changeset 51739 78f789a4c8a2
parent 51738 d17578f96e60
child 51740 7226f2626fb1
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.
mercurial/httppeer.py
--- 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'