commit: 8799e61f02277f75d5b0d28a7c08eed4012f8a77 Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> AuthorDate: Tue Mar 24 22:21:04 2015 +0000 Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> CommitDate: Tue Mar 24 22:21:04 2015 +0000 URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=8799e61f
compatibility.py: Adds explanation for binary mode awareness layman/compatibility.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layman/compatibility.py b/layman/compatibility.py index 67ca3e6..5b3beb1 100644 --- a/layman/compatibility.py +++ b/layman/compatibility.py @@ -21,6 +21,8 @@ def encode(text, enc="UTF-8"): def fileopen(path, mode='r', enc="UTF-8"): """py2, py3 compatibility function""" try: + # Can cause run-time when trying to encode. + # See https://bugs.gentoo.org/542804 if 'b' in mode: f = open(path, mode) else: