summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-04-06 04:21:05 +1000
committer Vas Crabb <vas@vastheman.com>2020-04-06 04:21:28 +1000
commit19aec7e9c34cb8ecfb01a691d735da8574c99519 (patch)
tree34a87f4f700aa1306184c90487fe8949a9e8c3c3
parentc3da4c5b4bc8cffcd481ea06dfbc56b8e9689a87 (diff)
(nw) hopefully work around deprecation warning - removing something in 3.9 when the replacement was only added in 3.2 is typical of Python's disregard for stability
-rw-r--r--scripts/build/msgfmt.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/build/msgfmt.py b/scripts/build/msgfmt.py
index deb02ae32b2..4147d5becb9 100644
--- a/scripts/build/msgfmt.py
+++ b/scripts/build/msgfmt.py
@@ -112,7 +112,8 @@ def generate():
7*4, # start of key index
7*4+len(keys)*8, # start of value index
0, 0) # size and offset of hash table
- output += array.array("i", offsets).tostring()
+ offsdata = array.array("i", offsets)
+ output += offsdata.tobytes() if hasattr(offsdata, "tobytes") else offsdata.tostring()
output += ids
output += strs
return output