bundle2: use modern Python division
authorAugie Fackler <augie@google.com>
Mon, 24 Jul 2017 11:17:36 -0400
changeset 33672 da7c285ec6da
parent 33671 38fc45721334
child 33673 5ae35a1347fd
bundle2: use modern Python division This was failing on Python 3 because the / was returning a float, which was then making the __mul__ on a bytes sad.
mercurial/bundle2.py
--- a/mercurial/bundle2.py	Mon Jul 24 11:16:53 2017 -0400
+++ b/mercurial/bundle2.py	Mon Jul 24 11:17:36 2017 -0400
@@ -145,7 +145,7 @@
 preserve.
 """
 
-from __future__ import absolute_import
+from __future__ import absolute_import, division
 
 import errno
 import re
@@ -1017,7 +1017,7 @@
         for key, value in advpar:
             parsizes.append(len(key))
             parsizes.append(len(value))
-        paramsizes = _pack(_makefpartparamsizes(len(parsizes) / 2), *parsizes)
+        paramsizes = _pack(_makefpartparamsizes(len(parsizes) // 2), *parsizes)
         header.append(paramsizes)
         # key, value
         for key, value in manpar: