[dpdk-dev] [PATCH v2 09/16] usertools: add new telemetry python script

Bruce Richardson bruce.richardson at intel.com
Fri Apr 10 11:54:30 CEST 2020


On Fri, Apr 10, 2020 at 10:43:18AM +0100, Pattan, Reshma wrote:
> 
> 
> > -----Original Message-----
> > From: Power, Ciara <ciara.power at intel.com>
> 
> Some  pylint checks  found, good to address  valid ones.
> 
> #pylint-3.6 ./usertools/dpdk-telemetry.py or # pylint ./usertools/dpdk-telemetry.py
> ************* Module dpdk-telemetry
> W: 18, 0: Bad indentation. Found 12 spaces, expected 8 (bad-indentation)
> W: 19, 0: Bad indentation. Found 12 spaces, expected 8 (bad-indentation)
> C: 30, 0: Unnecessary parens after 'while' keyword (superfluous-parens)
> W: 41, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation)
> W: 44, 0: Bad indentation. Found 2 spaces, expected 4 (bad-indentation)
> C:  1, 0: Invalid module name "dpdk-telemetry" (invalid-name)
> C:  1, 0: Missing module docstring (missing-docstring)
> C: 10, 0: Invalid constant name "telemetry_version" (invalid-name)
> C: 12, 0: Missing function docstring (missing-docstring)
> C: 21, 0: Missing function docstring (missing-docstring)
> C: 38, 0: Invalid constant name "fd" (invalid-name)
> 
> >+def read_socket(buf_len):
> >+        return json.loads(reply)
> 
> Close the open fd?
> 
> >+    except:
> >+            print("Error in reply: ", reply)
> 
> Close the open fd?
> 
> >+            raise
> 
> > +def handle_socket(path):
> <snip>
> > +        fd.connect(path)
> > +    except OSError:
> 
> Good to add reason of error message.
> Do you need to close the fd?
> 
> > +        return
> 
Thanks for the review, Reshma. For v3 we are ensuring pep8/pycodestyle
compliance, but we'll also add pylint to the list to run. We'll look into
the other issues too.


More information about the dev mailing list