Possible bug, bzrlib.initialize(setup_ui=False) is broken

John Meinel john at arbash-meinel.com
Mon Jun 20 10:09:04 UTC 2011


I'm guessing it is just a bug. I know it was recently changed in the 2.4
series to call __enter__ for you, which it did not do in the past. I'm
guessing the setup_ui=False path was just not tested.

John
=:->


On Mon, Jun 20, 2011 at 12:03 PM, Zygmunt Krynicki <
zygmunt.krynicki at canonical.com> wrote:

> Hi.
>
> On 2.4.0~beta4-1~bazaar1~natty1
>
> Calling bzrlib.initialize(setu_ui=**False) with the intent to use
> SilentUIFactory() is broken. The code goes to initialize with
> BzrLibraryState(ui=None) and immediately calls _start(). This in turn calls
> ui.__enter__() which fails with the following backtrace:
>
> (parts not relevant to bzr were removed)
>
>  File "/home/zyga/Linaro/lava-ci/**lava_ci/component.py", line 347, in
> __init__
>    self._bzr = initialize(setup_ui=False)
>  File "/usr/lib/python2.7/dist-**packages/bzrlib/__init__.py", line 185,
> in initialize
>    state._start()
>  File "/usr/lib/python2.7/dist-**packages/bzrlib/library_state.**py", line
> 93, in _start
>    self._ui.__enter__()
> AttributeError: 'NoneType' object has no attribute '__enter__'
>
>
> Best regards
> ZK
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20110620/a82c090e/attachment.html>


More information about the bazaar mailing list