Comment 6 for bug 354075

Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

So it looks like ConfigObj wants a list of lines, but bzr is passing a list containing the entire file. lifeless, the reason it worked for you is probably that your branch.conf is 0 or 1 lines long.

>>> from bzrlib.util.configobj.configobj import ConfigObj
>>> s = 'parent_location = http://bazaar-vcs.org/bzr/bzr.dev/\nstacked_on_location = ""\n'
>>> ConfigObj([s], encoding='utf-8')
Traceback (most recent call last):
    [snip]
bzrlib.util.configobj.configobj.ParseError: Invalid line at line "1".
>>> ConfigObj(s.splitlines(), encoding='utf-8')
ConfigObj({u'parent_location': u'http://bazaar-vcs.org/bzr/bzr.dev/', u'stacked_on_location': u''})