summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHex052 <elijahiff@gmail.com>2021-01-15 17:04:18 -0900
committerSebastian Thiel <sebastian.thiel@icloud.com>2021-01-17 10:31:49 +0800
commit4a1339a3d6751b2e7c125aa3195bdc872d45a887 (patch)
treec7afd153c79377b0e6ade12434dc55ae74ec241a
parent037d62a9966743cf7130193fa08d5182df251b27 (diff)
downloadgitpython-4a1339a3d6751b2e7c125aa3195bdc872d45a887.tar.gz
Make git.cmd.Git.CatFileContentStream iterable
Add __next__ method to git.cmd.Git.CatFileContentStream, so it can actually be used as an iterable
-rw-r--r--git/cmd.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 836aafff..31c0e859 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -497,6 +497,9 @@ class Git(LazyMixin):
# skipcq: PYL-E0301
def __iter__(self):
return self
+
+ def __next__(self):
+ return self.next()
def next(self):
line = self.readline()