lfs: fix interpolation of int and %s in an exception case stable
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 20 Oct 2022 12:05:17 -0400
branchstable
changeset 49526 192949b68159
parent 49525 c7c437f35687
child 49527 a3356ab610fc
lfs: fix interpolation of int and %s in an exception case Seen in the wild in a server log when MS antivirus was quarantining a file on the client side.
hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py	Wed Oct 19 17:00:03 2022 +0400
+++ b/hgext/lfs/blobstore.py	Thu Oct 20 12:05:17 2022 -0400
@@ -170,7 +170,7 @@
             # the localstore, because it's not going to match the expected.
             if content_length is not None and int(content_length) != size:
                 msg = (
-                    b"Response length (%s) does not match Content-Length "
+                    b"Response length (%d) does not match Content-Length "
                     b"header (%d): likely server-side crash"
                 )
                 raise LfsRemoteError(_(msg) % (size, int(content_length)))