summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2023-02-12 22:10:07 +0100
committerGitHub <noreply@github.com>2023-02-12 22:10:07 +0100
commit202e31cb4196e74cd190c2644a27b9d5479ba6ed (patch)
treef7c7b41ad01f4c16fbc43f29743896be328dc00f /git
parentc84dde218ef896a9b9af4f825ce222a6eb39291e (diff)
parent5ab58f3a5c8b1b50a73104ddc048fd9f6b663b0b (diff)
downloadgitpython-202e31cb4196e74cd190c2644a27b9d5479ba6ed.tar.gz
Merge pull request #1554 from eric-wieser/patch-4
Fix RecursionError when iterating streams
Diffstat (limited to 'git')
-rw-r--r--git/cmd.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 134001e2..dfce9024 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -695,15 +695,14 @@ class Git(LazyMixin):
return self
def __next__(self) -> bytes:
- return next(self)
-
- def next(self) -> bytes:
line = self.readline()
if not line:
raise StopIteration
return line
+ next = __next__
+
def __del__(self) -> None:
bytes_left = self._size - self._nbr
if bytes_left: