After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796328 - gengiotypefuncs.py: Read and parse files in binary mode
gengiotypefuncs.py: Read and parse files in binary mode
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2018-05-22 08:31 UTC by Nirbheek Chauhan
Modified: 2018-05-22 09:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gengiotypefuncs.py: Read and parse files in binary mode (1.49 KB, patch)
2018-05-22 08:31 UTC, Nirbheek Chauhan
committed Details | Review

Description Nirbheek Chauhan 2018-05-22 08:31:49 UTC
We don't do anything special with the contents, so reading in binary mode is fine.
Comment 1 Nirbheek Chauhan 2018-05-22 08:31:56 UTC
Created attachment 372327 [details] [review]
gengiotypefuncs.py: Read and parse files in binary mode

Fixes this build error on macOS when inside an ssh terminal:

Traceback (most recent call last):
  • File "[...]/gio/tests/gengiotypefuncs.py", line 23 in <module>
    for line in f:
  • File "[...]/lib/python3.6/encodings/ascii.py", line 26 in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2625: ordinal not in range(128)

Comment 2 Philip Withnall 2018-05-22 09:00:41 UTC
Review of attachment 372327 [details] [review]:

OK
Comment 3 Nirbheek Chauhan 2018-05-22 09:09:25 UTC
Attachment 372327 [details] pushed as 458b628 - gengiotypefuncs.py: Read and parse files in binary mode