From c4c6851c55757fb0bc9d77da97d7db9e7ae232d7 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 28 Mar 2016 10:25:05 +0200 Subject: fix(refs): don't raise StopIteration Fixes #394 --- .gitignore | 1 + git/refs/symbolic.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ce8d0b1b..d35cddeb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.py[co] *.swp *~ +.venv/ /*.egg-info /lib/GitPython.egg-info cover/ diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index f3799ed4..ae67a7ee 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -108,7 +108,7 @@ class SymbolicReference(object): yield tuple(line.split(' ', 1)) # END for each line except (OSError, IOError): - raise StopIteration + return # END no packed-refs file handling # NOTE: Had try-finally block around here to close the fp, # but some python version woudn't allow yields within that. -- cgit v1.2.1