Commit b1d23cb0 authored by kiilerix's avatar kiilerix

i18n: use array.tobytes on py3

array.tostring was deprecated in Python 3 and removed in 3.9 where
i18n/ as invoked from ' build' would fail with:

  AttributeError: 'array.array' object has no attribute 'tostring'

branch : stable
parent 585f139b2653
Pipeline #13921 passed with stage
in 24 minutes and 39 seconds
......@@ -120,7 +120,10 @@ class Msgfmt:
7*4, # start of key index
7*4+len(keys)*8, # start of value index
0, keystart) # size and offset of hash table
output += array.array("i", offsets).tostring()
if pycompat.ispy3:
output += array.array("i", offsets).tobytes()
output += array.array("i", offsets).tostring()
output += ids
output += strs
return output
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment