summaryrefslogtreecommitdiff
path: root/git/objects/submodule/base.py
diff options
context:
space:
mode:
authorYaroslav Halchenko <debian@onerussian.com>2017-09-21 10:29:29 -0400
committerGitHub <noreply@github.com>2017-09-21 10:29:29 -0400
commitfad63e83853a65ee9aa98d47a64da3b71e4c01af (patch)
tree9712af9bf8445dcb0cbe2bec74159a8fb4c3c995 /git/objects/submodule/base.py
parentcf8dc259fcc9c1397ea67cec3a6a4cb5816e3e68 (diff)
parent52912b549289b9df7eeada50691139df6364e92d (diff)
downloadgitpython-fad63e83853a65ee9aa98d47a64da3b71e4c01af.tar.gz
Merge pull request #667 from yarikoptic/bf-useget
BF: use get, not casting get_value while dealing with submodule path/url etc
Diffstat (limited to 'git/objects/submodule/base.py')
-rw-r--r--git/objects/submodule/base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index e3912d88..a6b4caed 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -123,12 +123,12 @@ class Submodule(IndexObject, Iterable, Traversable):
reader = self.config_reader()
# default submodule values
try:
- self.path = reader.get_value('path')
+ self.path = reader.get('path')
except cp.NoSectionError:
raise ValueError("This submodule instance does not exist anymore in '%s' file"
% osp.join(self.repo.working_tree_dir, '.gitmodules'))
# end
- self._url = reader.get_value('url')
+ self._url = reader.get('url')
# git-python extension values - optional
self._branch_path = reader.get_value(self.k_head_option, git.Head.to_full_path(self.k_head_default))
elif attr == '_name':
@@ -1168,11 +1168,11 @@ class Submodule(IndexObject, Iterable, Traversable):
for sms in parser.sections():
n = sm_name(sms)
- p = parser.get_value(sms, 'path')
- u = parser.get_value(sms, 'url')
+ p = parser.get(sms, 'path')
+ u = parser.get(sms, 'url')
b = cls.k_head_default
if parser.has_option(sms, cls.k_head_option):
- b = str(parser.get_value(sms, cls.k_head_option))
+ b = str(parser.get(sms, cls.k_head_option))
# END handle optional information
# get the binsha