diff options
-rw-r--r-- | git_command.py | 4 | ||||
-rw-r--r-- | git_config.py | 2 | ||||
-rw-r--r-- | project.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/git_command.py b/git_command.py index 354fc715..53b3e75c 100644 --- a/git_command.py +++ b/git_command.py | |||
@@ -80,13 +80,13 @@ class _GitCall(object): | |||
80 | def version(self): | 80 | def version(self): |
81 | p = GitCommand(None, ['--version'], capture_stdout=True) | 81 | p = GitCommand(None, ['--version'], capture_stdout=True) |
82 | if p.Wait() == 0: | 82 | if p.Wait() == 0: |
83 | return p.stdout | 83 | return p.stdout.decode('utf-8') |
84 | return None | 84 | return None |
85 | 85 | ||
86 | def version_tuple(self): | 86 | def version_tuple(self): |
87 | global _git_version | 87 | global _git_version |
88 | if _git_version is None: | 88 | if _git_version is None: |
89 | ver_str = git.version().decode('utf-8') | 89 | ver_str = git.version() |
90 | _git_version = Wrapper().ParseGitVersion(ver_str) | 90 | _git_version = Wrapper().ParseGitVersion(ver_str) |
91 | if _git_version is None: | 91 | if _git_version is None: |
92 | print('fatal: "%s" unsupported' % ver_str, file=sys.stderr) | 92 | print('fatal: "%s" unsupported' % ver_str, file=sys.stderr) |
diff --git a/git_config.py b/git_config.py index a667b3f8..aa07d1b7 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -697,7 +697,7 @@ class Branch(object): | |||
697 | self._Set('merge', self.merge) | 697 | self._Set('merge', self.merge) |
698 | 698 | ||
699 | else: | 699 | else: |
700 | fd = open(self._config.file, 'ab') | 700 | fd = open(self._config.file, 'a') |
701 | try: | 701 | try: |
702 | fd.write('[branch "%s"]\n' % self.name) | 702 | fd.write('[branch "%s"]\n' % self.name) |
703 | if self.remote: | 703 | if self.remote: |
@@ -46,7 +46,7 @@ if not is_python3(): | |||
46 | def _lwrite(path, content): | 46 | def _lwrite(path, content): |
47 | lock = '%s.lock' % path | 47 | lock = '%s.lock' % path |
48 | 48 | ||
49 | fd = open(lock, 'wb') | 49 | fd = open(lock, 'w') |
50 | try: | 50 | try: |
51 | fd.write(content) | 51 | fd.write(content) |
52 | finally: | 52 | finally: |