Code review comment for lp:~statik/bzr/bzr-less-signal

Revision history for this message
Robert Collins (lifeless) wrote :

On Mon, 2010-02-15 at 04:14 +0000, Elliot Murphy wrote:
> On the bug, robert mentioned "we'd still want to only do it once, other than that I agree that there is no need to do it on import." I don't know enough about bzr to know whether TextUIFactory constructor runs only once during a run of bzr, or whether this needs some additional work to be sure the signal is only wired once.

Additional work will be required - doing it in the constructor isn't
really going to work well - signals can't cope if e.g. two TextUI
objects exist.

rather you need to keep this at module scope (and I'd keep it in
osutils).

Have a function the UI constructor can call, which checks a global to
see if its already done its registration.

-Rob

« Back to merge proposal