diff options
author | Chirayu Desai <cdesai@cyanogenmod.org> | 2013-11-19 18:46:29 +0530 |
---|---|---|
committer | Chirayu Desai <chirayudesai1@gmail.com> | 2013-11-21 06:03:22 +0000 |
commit | 0eb35cbe5096128e4a760aca6842ecdbea5baf1a (patch) | |
tree | 6134f979145140346b3eeeacfd12cbd6572f32d3 /git_config.py | |
parent | ce201a5311c2fe90dce479ee12c078cd26ccc0c4 (diff) | |
download | git-repo-0eb35cbe5096128e4a760aca6842ecdbea5baf1a.tar.gz |
Fix some python3 encoding issues
* Add .decode('utf-8') where needed
* Add 'b' to `open` where needed, and remove where unnecessary
Change-Id: I0f03ecf9ed1a78e3b2f15f9469deb9aaab698657
Diffstat (limited to 'git_config.py')
-rw-r--r-- | git_config.py | 4 |
1 files changed, 2 insertions, 2 deletions
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): | |||
304 | d = self._do('--null', '--list') | 304 | d = self._do('--null', '--list') |
305 | if d is None: | 305 | if d is None: |
306 | return c | 306 | return c |
307 | for line in d.rstrip('\0').split('\0'): # pylint: disable=W1401 | 307 | for line in d.decode('utf-8').rstrip('\0').split('\0'): # pylint: disable=W1401 |
308 | # Backslash is not anomalous | 308 | # Backslash is not anomalous |
309 | if '\n' in line: | 309 | if '\n' in line: |
310 | key, val = line.split('\n', 1) | 310 | key, val = line.split('\n', 1) |
311 | else: | 311 | else: |