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

Pattan, Reshma reshma.pattan at intel.com
Fri Apr 10 11:43:18 CEST 2020



> -----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




More information about the dev mailing list