Patchwork [05,of,10,py3] lock: use %d to format integer into a bytestring

login
register
mail settings
Submitter Augie Fackler
Date March 12, 2017, 6:57 p.m.
Message ID <666d6b8778093c73611a.1489345065@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/19203/
State Accepted
Headers show

Comments

Augie Fackler - March 12, 2017, 6:57 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1489303744 14400
#      Sun Mar 12 03:29:04 2017 -0400
# Node ID 666d6b8778093c73611aa728f92c688a75994ed6
# Parent  74e974791be1479b80c6fd42923d999b9c2891a2
lock: use %d to format integer into a bytestring

Patch

diff --git a/mercurial/lock.py b/mercurial/lock.py
--- a/mercurial/lock.py
+++ b/mercurial/lock.py
@@ -118,7 +118,7 @@  class lock(object):
             return
         if lock._host is None:
             lock._host = _getlockprefix()
-        lockname = '%s:%s' % (lock._host, self.pid)
+        lockname = '%s:%d' % (lock._host, self.pid)
         retry = 5
         while not self.held and retry:
             retry -= 1