config: use the right API to access git-submodule
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 30 Jan 2021 00:36:54 +0100
changeset 46425 f7621fa14b84
parent 46424 5272542196cc
child 46426 0da465780bba
config: use the right API to access git-submodule Differential Revision: https://phab.mercurial-scm.org/D9923
hgext/convert/git.py
--- a/hgext/convert/git.py	Fri Jan 29 14:03:39 2021 +0100
+++ b/hgext/convert/git.py	Sat Jan 30 00:36:54 2021 +0100
@@ -247,7 +247,8 @@
             b'\n'.join(line.strip() for line in content.split(b'\n')),
         )
         for sec in c.sections():
-            s = c[sec]
+            # turn the config object into a real dict
+            s = dict(c.items(sec))
             if b'url' in s and b'path' in s:
                 self.submodules.append(submodule(s[b'path'], b'', s[b'url']))