Am 13. Dezember 2010 13:29 schrieb Rene Nussbaumer <[email protected]>: > On Fri, Dec 10, 2010 at 5:34 PM, Michael Hanselmann <[email protected]> wrote: >> --- a/lib/constants.py >> +++ b/lib/constants.py >> @@ -947,6 +947,10 @@ QR_NODE = "node" >> #: List of resources which can be queried using L{opcodes.OpQuery} >> QR_OP_QUERY = frozenset([QR_INSTANCE, QR_NODE]) >> >> +#: List of resources which can be queried using LUXI >> +QR_OP_LUXI = QR_OP_QUERY.union(frozenset([ >> + ])) >> + > > Wrong nesting? Shouldn't be the frozenset the outermost call? You want > to have a frozenset after all modifications, wont you?
No, it is correct. frozenset.union is used to merge two sets. >>> QR_OP_QUERY = frozenset([1, 2, 3]) >>> QR_OP_QUERY.union(frozenset(["a", "b"])) frozenset(['a', 1, 2, 3, 'b']) Actually, the second frozenset() is not needed: >>> QR_OP_QUERY.union(["a", "b"]) frozenset(['a', 1, 2, 3, 'b']) I'll update the patch and push. Michael
