Skip to content

Commit c4c6851

Browse files
committed
fix(refs): don't raise StopIteration
Fixes gitpython-developers#394
1 parent c877794 commit c4c6851

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.py[co]
22
*.swp
33
*~
4+
.venv/
45
/*.egg-info
56
/lib/GitPython.egg-info
67
cover/

‎git/refs/symbolic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def _iter_packed_refs(cls, repo):
108108
yield tuple(line.split(' ', 1))
109109
# END for each line
110110
except (OSError, IOError):
111-
raise StopIteration
111+
return
112112
# END no packed-refs file handling
113113
# NOTE: Had try-finally block around here to close the fp,
114114
# but some python version woudn't allow yields within that.

0 commit comments

Comments
 (0)