Skip to content

Commit

Permalink
Make git.cmd.Git.CatFileContentStream iterable
Browse files Browse the repository at this point in the history
Add __next__ method to git.cmd.Git.CatFileContentStream, so it can actually be used as an iterable
  • Loading branch information
Hex052 authored and Byron committed Jan 17, 2021
1 parent 037d62a commit 4a1339a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ def readlines(self, size=-1):
# skipcq: PYL-E0301
def __iter__(self):
return self

def __next__(self):
return self.next()

def next(self):
line = self.readline()
Expand Down

0 comments on commit 4a1339a

Please sign in to comment.