Skip to content

Commit 202e31c

Browse files
authored
Merge pull request #1554 from eric-wieser/patch-4
Fix RecursionError when iterating streams
2 parents c84dde2 + 5ab58f3 commit 202e31c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

git/cmd.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,15 +695,14 @@ def __iter__(self) -> "Git.CatFileContentStream":
695695
return self
696696

697697
def __next__(self) -> bytes:
698-
return next(self)
699-
700-
def next(self) -> bytes:
701698
line = self.readline()
702699
if not line:
703700
raise StopIteration
704701

705702
return line
706703

704+
next = __next__
705+
707706
def __del__(self) -> None:
708707
bytes_left = self._size - self._nbr
709708
if bytes_left:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy