Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions git/objects/submodule/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from git.exc import (
InvalidGitRepositoryError,
NoSuchPathError,
RepositoryDirtyError
RepositoryDirtyError,
BadName
)
from git.objects.base import IndexObject, Object
from git.objects.util import Traversable
Expand Down Expand Up @@ -1153,10 +1154,10 @@ def children(self):
@classmethod
def iter_items(cls, repo, parent_commit='HEAD'):
""":return: iterator yielding Submodule instances available in the given repository"""
pc = repo.commit(parent_commit) # parent commit instance
try:
pc = repo.commit(parent_commit) # parent commit instance
parser = cls._config_parser(repo, pc, read_only=True)
except IOError:
except (IOError, BadName):
return
# END handle empty iterator

Expand Down