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''})
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 bazaar- vcs.org/ bzr/bzr. dev/\nstacked_ on_location = ""\n' util.configobj. configobj. ParseError: Invalid line at line "1". s.splitlines( ), encoding='utf-8') {u'parent_ location' : u'http:// bazaar- vcs.org/ bzr/bzr. dev/', u'stacked_ on_location' : u''})
>>> s = 'parent_location = http://
>>> ConfigObj([s], encoding='utf-8')
Traceback (most recent call last):
[snip]
bzrlib.
>>> ConfigObj(
ConfigObj(