Be explicit about text file encoding 50/72850/1
authorGwenael Lambrouin <gwenael.lambrouin@orange.com>
Tue, 24 Aug 2021 09:42:26 +0000 (11:42 +0200)
committerGwenael Lambrouin <gwenael.lambrouin@orange.com>
Tue, 24 Aug 2021 12:41:58 +0000 (14:41 +0200)
commit58a44a8ea1e48ba8936485086794cb59795a2d03
treed91beeac3df5c0ecef37eb093a5eff52c6317e37
parent1574b1655e47e4c37dfaf8de8cb0a8bfcb999894
Be explicit about text file encoding

Python PEP 597 (https://www.python.org/dev/peps/pep-0597) recommends to use an
explicit encoding for text files instead of the default locale encoding.
Pylint 2.10 adds a new checker named unspecified-encoding for that.

The present patch adds explicit utf-8 encoding to open() calls in nfvbench and
fixes pylint unspecified-encoding warnings.

Remark: this patch does not change nfvbench behaviour on systems where utf-8 is
the locale encoding, which is generally the case on Linux systems.

Change-Id: Ic4dfb37e1ea958452a0173f7630a68f0d95071ae
Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@orange.com>
nfvbench/chaining.py
nfvbench/config.py
nfvbench/credentials.py
nfvbench/nfvbench.py
nfvbench/traffic_gen/trex_gen.py
nfvbench/traffic_server.py
nfvbench/utils.py