Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Fix RecursionError when iterating streams#1554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -695,15 +695,14 @@ def __iter__(self) -> "Git.CatFileContentStream": | ||||
return self | ||||
def __next__(self) -> bytes: | ||||
line = self.readline() | ||||
if not line: | ||||
raise StopIteration | ||||
return line | ||||
next = __next__ | ||||
Comment on lines +704 to +705 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Feel free to commit through the github UI if you want to drop this Python2 compatibility layer entirely: Suggested change
Note that there may be some downstream code that relies on using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Ah, right. Oh well, let's be conservative then. | ||||
def __del__(self) -> None: | ||||
bytes_left = self._size - self._nbr | ||||
if bytes_left: | ||||