diff options
| author | Chirayu Desai <chirayudesai1@gmail.com> | 2014-08-19 22:57:17 +0530 |
|---|---|---|
| committer | Chirayu Desai <chirayudesai1@gmail.com> | 2014-08-19 23:05:44 +0530 |
| commit | 303a82f33a1360036b6f70864d3099f9d803f2c7 (patch) | |
| tree | 8a6b2c95ac0b06886cabb3118c885d3b128da491 | |
| parent | a8d539189e1c788663f022cbebd3b5ff28aaeb4b (diff) | |
| download | git-repo-303a82f33a1360036b6f70864d3099f9d803f2c7.tar.gz | |
Don't open non-binary files as binary
* Don't pen the git config file, and the git ".lock" file as binary.
Change-Id: I7b3939658456f2fd0a0500443cdd8d1ee1a4459d
| -rw-r--r-- | git_config.py | 2 | ||||
| -rw-r--r-- | project.py | 2 |
2 files changed, 2 insertions, 2 deletions
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: |
