1
0
Fork 0

Fix some python3 encoding issues

* Add .decode('utf-8') where needed
* Add 'b' to `open` where needed, and remove where unnecessary

Change-Id: I0f03ecf9ed1a78e3b2f15f9469deb9aaab698657
This commit is contained in:
Chirayu Desai 2013-11-19 18:46:29 +05:30 committed by Chirayu Desai
parent ce201a5311
commit 0eb35cbe50
5 changed files with 6 additions and 6 deletions

View file

@ -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: