samba-tool group list patch

Matthieu Patou mat at samba.org
Tue Feb 19 13:39:43 MST 2013


On 02/19/2013 12:42 AM, Michael Wood wrote:
> Hi
>
> On 19 February 2013 06:39, Matthieu Patou <mat at samba.org> wrote:
> [...]
>> +                hgtype = hex(int("%s" % msg["grouptype"]) &
>> 0x00000000FFFFFFFF)
>> +                if (hgtype == hex(int(security_group.get("Builtin")))):
>> +                    self.outf.write("Security         Builtin\n")
>> +                elif (hgtype == hex(int(security_group.get("Domain")))):
>> +                    self.outf.write("Security         Domain\n")
> [...]
>> +                else:
>> +                    self.outf.write("\n")
>> Can we use a switch ? + precalculated hex
>> switch(hgtype):
>>      case HEX_SEC_GRP_BUILTIN:
>>          ...
>>      case HEX_SEC_GRP_DOMAIN:
>>          ...
> Unfortunately Python doesn't have a switch statement :)
Oh really I'm shocked ! I'm surprised I never run into the issue, thanks 
for pointing it.

Most of this issue is close then.

-- 
Matthieu Patou
Samba Team
http://samba.org



More information about the samba-technical mailing list