File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 20
20
from git .exc import (
21
21
InvalidGitRepositoryError ,
22
22
NoSuchPathError ,
23
- RepositoryDirtyError
23
+ RepositoryDirtyError ,
24
+ BadName
24
25
)
25
26
from git .objects .base import IndexObject , Object
26
27
from git .objects .util import Traversable
@@ -1153,10 +1154,10 @@ def children(self):
1153
1154
@classmethod
1154
1155
def iter_items (cls , repo , parent_commit = 'HEAD' ):
1155
1156
""":return: iterator yielding Submodule instances available in the given repository"""
1156
- pc = repo .commit (parent_commit ) # parent commit instance
1157
1157
try :
1158
+ pc = repo .commit (parent_commit ) # parent commit instance
1158
1159
parser = cls ._config_parser (repo , pc , read_only = True )
1159
- except IOError :
1160
+ except ( IOError , BadName ) :
1160
1161
return
1161
1162
# END handle empty iterator
1162
1163
You can’t perform that action at this time.
0 commit comments