diff options
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 32ee830e..bc5a7c35 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -682,12 +682,9 @@ class Repo(object): data = self.git.blame(rev, '--', file, p=True, incremental=True, stdout_as_string=False, **kwargs) commits = dict() - stream = iter(data.split(b'\n')) + stream = (line for line in data.split(b'\n') if line) while True: line = next(stream) # when exhausted, casues a StopIteration, terminating this function - if line.strip() == '' or line.strip() == b'': - # Skip over empty lines - continue hexsha, orig_lineno, lineno, num_lines = line.split() lineno = int(lineno) num_lines = int(num_lines) |