From 4a1339a3d6751b2e7c125aa3195bdc872d45a887 Mon Sep 17 00:00:00 2001 From: Hex052 Date: Fri, 15 Jan 2021 17:04:18 -0900 Subject: Make git.cmd.Git.CatFileContentStream iterable Add __next__ method to git.cmd.Git.CatFileContentStream, so it can actually be used as an iterable --- git/cmd.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'git') 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() -- cgit v1.2.1