##// END OF EJS Templates
git: fixed py3 compat for submodule read.
dan -
r3942:c1671407 default
parent child Browse files
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 content = '\n'.join(l.strip() for l in content.split('\n'))
472 for line in _content.splitlines():
473 yield line
473
474
474 parser = configparser.ConfigParser()
475 parser = configparser.ConfigParser()
475 parser.readfp(StringIO(content))
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