Re: [PATCH] trace: avoid "is" with a literal Python 3.8 warnings

2019-10-10 Thread Markus Armbruster
Stefan Hajnoczi writes: > The following statement produces a SyntaxWarning with Python 3.8: > > if len(format) is 0: > scripts/tracetool/__init__.py:459: SyntaxWarning: "is" with a literal. Did > you mean "=="? > > Use the conventional len(x) == 0 syntax instead. > > Reported-by: Daniel P. B

Re: [PATCH] trace: avoid "is" with a literal Python 3.8 warnings

2019-10-10 Thread Stefan Hajnoczi
On Thu, Oct 10, 2019 at 01:21:54PM +0100, Stefan Hajnoczi wrote: > The following statement produces a SyntaxWarning with Python 3.8: > > if len(format) is 0: > scripts/tracetool/__init__.py:459: SyntaxWarning: "is" with a literal. Did > you mean "=="? > > Use the conventional len(x) == 0 syn

Re: [PATCH] trace: avoid "is" with a literal Python 3.8 warnings

2019-10-10 Thread Philippe Mathieu-Daudé
On 10/10/19 2:21 PM, Stefan Hajnoczi wrote: The following statement produces a SyntaxWarning with Python 3.8: if len(format) is 0: scripts/tracetool/__init__.py:459: SyntaxWarning: "is" with a literal. Did you mean "=="? Use the conventional len(x) == 0 syntax instead. Ah this is a new

Re: [PATCH] trace: avoid "is" with a literal Python 3.8 warnings

2019-10-10 Thread Daniel P . Berrangé
On Thu, Oct 10, 2019 at 01:21:54PM +0100, Stefan Hajnoczi wrote: > The following statement produces a SyntaxWarning with Python 3.8: > > if len(format) is 0: > scripts/tracetool/__init__.py:459: SyntaxWarning: "is" with a literal. Did > you mean "=="? > > Use the conventional len(x) == 0 syn

[PATCH] trace: avoid "is" with a literal Python 3.8 warnings

2019-10-10 Thread Stefan Hajnoczi
The following statement produces a SyntaxWarning with Python 3.8: if len(format) is 0: scripts/tracetool/__init__.py:459: SyntaxWarning: "is" with a literal. Did you mean "=="? Use the conventional len(x) == 0 syntax instead. Reported-by: Daniel P. Berrangé Signed-off-by: Stefan Hajnoczi