Merge lp:~chmouel/nova/lp649865 into lp:~hudson-openstack/nova/trunk

Proposed by Chmouel Boudjnah
Status: Rejected
Rejected by: Jay Pipes
Proposed branch: lp:~chmouel/nova/lp649865
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 12 lines (+2/-0)
1 file modified
nova/flags.py (+2/-0)
To merge this branch: bzr merge lp:~chmouel/nova/lp649865
Reviewer Review Type Date Requested Status
termie Pending
Nova Core security contacts Pending
Review via email: mp+37461@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

termie, could you check this patch out? for some reason I thought that megaflags already dealt with this?

Revision history for this message
Soren Hansen (soren) wrote :

On 05-10-2010 22:07, Jay Pipes wrote:
> termie, could you check this patch out? for some reason I thought that megaflags already dealt with this?

It does. That is what is happening in the bug. It handles it by
detecting collisions. This basically makes it so that collisions are
ignored. I don't think this is the right thing to do.

If something is causing the same module to be imported twice, that's the
real bug. An important one, even.

--
Soren Hansen
Ubuntu Developer http://www.ubuntu.com/
OpenStack Developer http://www.openstack.org/

Revision history for this message
Jay Pipes (jaypipes) wrote :

Marking this Rejected as the bug is invalid.

Unmerged revisions

320. By Chmouel Boudjnah

Avoid having gflags.DuplicateFlagError when bulding argument list.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/flags.py'
2--- nova/flags.py 2010-09-29 00:53:27 +0000
3+++ nova/flags.py 2010-10-04 12:01:57 +0000
4@@ -136,6 +136,8 @@
5
6 def _wrapper(func):
7 def _wrapped(*args, **kw):
8+ if args and args[0] in FLAGS: #already defnied
9+ return
10 kw.setdefault('flag_values', FLAGS)
11 func(*args, **kw)
12 _wrapped.func_name = func.func_name