summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorVincent Driessen <me@nvie.com>2016-04-06 17:12:23 +0200
committerVincent Driessen <me@nvie.com>2016-04-06 17:12:23 +0200
commit6271586d7ef494dd5baeff94abebbab97d45482b (patch)
treedecbc4529c8979c7886e0d6cb6ecd93edfbaa74d /git/cmd.py
parentdabd563ed3d9dc02e01fbf3dd301c94c33d6d273 (diff)
downloadgitpython-6271586d7ef494dd5baeff94abebbab97d45482b.tar.gz
Make sure .read() and friends always return bytes
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 2f900ae2..7bd94e4d 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -355,7 +355,7 @@ class Git(LazyMixin):
def read(self, size=-1):
bytes_left = self._size - self._nbr
if bytes_left == 0:
- return ''
+ return b''
if size > -1:
# assure we don't try to read past our limit
size = min(bytes_left, size)
@@ -374,7 +374,7 @@ class Git(LazyMixin):
def readline(self, size=-1):
if self._nbr == self._size:
- return ''
+ return b''
# clamp size to lowest allowed value
bytes_left = self._size - self._nbr