Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Backports:SLE-15-SP4:FactoryCandidates
python-polib
polib-1.1.0-fix-tests-big-endian.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File polib-1.1.0-fix-tests-big-endian.patch of Package python-polib
--- a/polib.py +++ b/polib.py @@ -592,7 +592,7 @@ class _BaseFile(list): offsets = koffsets + voffsets output = struct.pack( - "Iiiiiii", + "<Iiiiiii", # Magic number MOFile.MAGIC, # Version @@ -607,10 +607,15 @@ class _BaseFile(list): 0, keystart ) + outarr = array.array("i", offsets) + # since 0.19.8 msgfmt produces little-endian files by default + if sys.byteorder == "big": + outarr.byteswap() + if PY3 and sys.version_info.minor > 1: # python 3.2 or superior - output += array.array("i", offsets).tobytes() + output += outarr.tobytes() else: - output += array.array("i", offsets).tostring() + output += outarr.tostring() output += ids output += strs return output
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor