Re: [dpdk-dev] [PATCH 09/11] dpdk-pmdinfo: do not use len(x) to test for empty

2020-09-07 Thread Stephen Hemminger
On Mon, 7 Sep 2020 10:03:43 +0100 Bruce Richardson wrote: > Does an empty sequence not directly resolve to false in python? If so, the > len should be removable and just use "if not self.contents:" Yes, len should be removed there

Re: [dpdk-dev] [PATCH 09/11] dpdk-pmdinfo: do not use len(x) to test for empty

2020-09-07 Thread Bruce Richardson
On Sat, Sep 05, 2020 at 06:31:31PM -0700, Stephen Hemminger wrote: > This fixes the following python lint warnings. > usertools/dpdk-pmdinfo.py:188:11: C1801: Do not use `len(SEQUENCE)` to > determine if a sequence is empty (len-as-condition) > usertools/dpdk-pmdinfo.py:196:21: C1801: Do not use `

[dpdk-dev] [PATCH 09/11] dpdk-pmdinfo: do not use len(x) to test for empty

2020-09-05 Thread Stephen Hemminger
This fixes the following python lint warnings. usertools/dpdk-pmdinfo.py:188:11: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition) usertools/dpdk-pmdinfo.py:196:21: C1801: Do not use `len(SEQUENCE)` to determine if a sequence is empty (len-as-condition) user