Show More
@@ -466,13 +466,14 b' class GitCommit(base.BaseCommit):' | |||||
466 | except NodeDoesNotExistError: |
|
466 | except NodeDoesNotExistError: | |
467 | return None |
|
467 | return None | |
468 |
|
468 | |||
469 | content = submodules_node.content |
|
469 | # ConfigParser fails if there are whitespaces, also it needs an iterable | |
470 |
|
470 | # file like content | ||
471 | # ConfigParser fails if there are whitespaces |
|
471 | def iter_content(_content): | |
472 |
|
|
472 | for line in _content.splitlines(): | |
|
473 | yield line | |||
473 |
|
474 | |||
474 | parser = configparser.ConfigParser() |
|
475 | parser = configparser.ConfigParser() | |
475 |
parser.read |
|
476 | parser.read_file(iter_content(submodules_node.content)) | |
476 |
|
477 | |||
477 | for section in parser.sections(): |
|
478 | for section in parser.sections(): | |
478 | path = parser.get(section, 'path') |
|
479 | path = parser.get(section, 'path') |
General Comments 0
You need to be logged in to leave comments.
Login now