From e469a0c741832f6584513f4a382d6b93f417b8d2 Mon Sep 17 00:00:00 2001 From: Dylan Deng Date: Sat, 23 Jun 2018 15:02:26 +0800 Subject: fix some sync error while using python3 Change-Id: I70925e48756c356d48359679d8ad1b9e33a68595 --- git_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'git_config.py') diff --git a/git_config.py b/git_config.py index 7bc6f77d..70b22ce1 100644 --- a/git_config.py +++ b/git_config.py @@ -306,7 +306,9 @@ class GitConfig(object): d = self._do('--null', '--list') if d is None: return c - for line in d.decode('utf-8').rstrip('\0').split('\0'): + if not is_python3(): + d = d.decode('utf-8') + for line in d.rstrip('\0').split('\0'): if '\n' in line: key, val = line.split('\n', 1) else: -- cgit v1.2.3-54-g00ecf