From 0eb35cbe5096128e4a760aca6842ecdbea5baf1a Mon Sep 17 00:00:00 2001 From: Chirayu Desai Date: Tue, 19 Nov 2013 18:46:29 +0530 Subject: Fix some python3 encoding issues * Add .decode('utf-8') where needed * Add 'b' to `open` where needed, and remove where unnecessary Change-Id: I0f03ecf9ed1a78e3b2f15f9469deb9aaab698657 --- git_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git_config.py') diff --git a/git_config.py b/git_config.py index a294a0b6..f6093a25 100644 --- a/git_config.py +++ b/git_config.py @@ -304,8 +304,8 @@ class GitConfig(object): d = self._do('--null', '--list') if d is None: return c - for line in d.rstrip('\0').split('\0'): # pylint: disable=W1401 - # Backslash is not anomalous + for line in d.decode('utf-8').rstrip('\0').split('\0'): # pylint: disable=W1401 + # Backslash is not anomalous if '\n' in line: key, val = line.split('\n', 1) else: -- cgit v1.2.3-54-g00ecf