Skip to content

Commit fad63e8

Browse files
authored
Merge pull request #667 from yarikoptic/bf-useget
BF: use get, not casting get_value while dealing with submodule path/url etc
2 parents cf8dc25 + 52912b5 commit fad63e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: git/objects/submodule/base.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ def _set_cache_(self, attr):
123123
reader = self.config_reader()
124124
# default submodule values
125125
try:
126-
self.path = reader.get_value('path')
126+
self.path = reader.get('path')
127127
except cp.NoSectionError:
128128
raise ValueError("This submodule instance does not exist anymore in '%s' file"
129129
% osp.join(self.repo.working_tree_dir, '.gitmodules'))
130130
# end
131-
self._url = reader.get_value('url')
131+
self._url = reader.get('url')
132132
# git-python extension values - optional
133133
self._branch_path = reader.get_value(self.k_head_option, git.Head.to_full_path(self.k_head_default))
134134
elif attr == '_name':
@@ -1168,11 +1168,11 @@ def iter_items(cls, repo, parent_commit='HEAD'):
11681168

11691169
for sms in parser.sections():
11701170
n = sm_name(sms)
1171-
p = parser.get_value(sms, 'path')
1172-
u = parser.get_value(sms, 'url')
1171+
p = parser.get(sms, 'path')
1172+
u = parser.get(sms, 'url')
11731173
b = cls.k_head_default
11741174
if parser.has_option(sms, cls.k_head_option):
1175-
b = str(parser.get_value(sms, cls.k_head_option))
1175+
b = str(parser.get(sms, cls.k_head_option))
11761176
# END handle optional information
11771177

11781178
# get the binsha

0 commit comments

Comments
 (0)