[meld/Python3] vc.git: Fix commit message decoding for py3k
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/Python3] vc.git: Fix commit message decoding for py3k
- Date: Sun, 24 Jul 2016 01:48:47 +0000 (UTC)
commit d9e3e574f4e995bbc37474aa4917ae0e5669c741
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Jul 24 11:37:05 2016 +1000
vc.git: Fix commit message decoding for py3k
meld/vc/git.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index 1135fb2..7f86457 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -139,8 +139,8 @@ class Vc(_vc.Vc):
if os.path.exists(commit_path):
# If I have to deal with non-ascii, non-UTF8 pregenerated commit
# messages, I'm taking up pig farming.
- with open(commit_path) as f:
- message = f.read().decode('utf8')
+ with open(commit_path, encoding='utf-8') as f:
+ message = f.read()
return "\n".join(
(l for l in message.splitlines() if not l.startswith("#")))
return None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]