On 11/09/2015 05:38 AM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> writes: > >> From: Markus Armbruster <arm...@redhat.com> >> >> Reduce the ugly flat union / simple union conditional by doing just >> the essential work here, namely setting self.tag_member. >> Move the rest to callers. >>
>> @@ -1052,8 +1053,6 @@ class QAPISchemaObjectTypeVariants(object): >> def check(self, schema, seen): >> if self.tag_name: # flat union >> self.tag_member = seen[self.tag_name] > > My patch has: > > - if self.tag_name: # flat union > + if not self.tag_member: # flat union > self.tag_member = seen[self.tag_name] > > Any particular reason for dropping it? Not really; I couldn't find anything in later patches that cared either way. > > I like my change, because I feel it makes the assignment's purpose more > obvious: ensure .tag_member is set. Sure, we'll go with your approach. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature