[PATCH] more python patches (unused variables)
Douglas Bagnall
douglas.bagnall at catalyst.net.nz
Wed Oct 31 20:42:04 UTC 2018
hi Noel,
> I think the majority of these are either cut'n'paste related or remnants
> of debug code, ones I would worry a little about (but not much) would be
>> [PATCH 03/16] dbchecker: remove unused variables
>> - controls = ["extended_dn:1:1", "show_recycled:1"]
>
> Is there a chance the controls should be used in the following
>
>> if self.do_modify(m, ["show_recycled:1"],
Yes! (and this is why we shouldn't leave unused variables lying around
-- they make it look like we're doing things that we are not).
> I don't know enough about that to comment more:-(
Likewise. But fortunately your pointing this one out enticed Andrew to
look at the patch and he says it is right.
> also err_wrong_default_sd doesn't use sd_old that is passed in
Right. Unused arguments are of course trickier in general because the
function might need to have a particular signature for external reasons.
But not in this case.
>> [PATCH 14/16] python/join: remove unused imports and variables
>
>> record_type = dnsp.DNS_TYPE_A
>
> that one maybe could be used in the call to
> 'dns_conn.DnssrvEnumRecords2' in the same method, so maybe record_type
> should have been used there (with record_type = dnsp.DNS_TYPE_ALL) but
> again I have no real clue.
Andrew approves of this one too.
> other than that I'd say RB+ from m3. I guess it would be wise to wait a
> little bit to see if anyone one else wants to chime in and if nobody
> raises anything in the next day or 2 then push the lot :-)
Thanks.
Douglas
More information about the samba-technical
mailing list