[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 09/14] Use temporary repo id for edited object to prevent Duplicate Repo error.

Chris Lumens wrote:

This looks fine, though I really dislike storing the counter in the
AnacondaYum object.  Is there anywhere else it could go?

Why you don't like it? It's per AnacondaYum object counter (repos
are kept in AnacondaYum object) so it seems logical to have it there.
I tried to have it as task_gui module attribute or RepoEditor class
attribute, but it doesn't work because we may be importing task_gui.py twice:
First from gui.py:createRepoWindow, and then in
gui.py:InstallControlWindow:SetScreen where we import it unconditionally
with import.imp.load_module, initializing the module (and so the counter)
for the second time which results in Duplicate Repo Names in some cases.

So it seems I'd need either a hack to prevent double initialization
or to find some other place - even more global? anaconda? - I don't
like it at all. I may be easily missing something - any suggestion?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]