trace: avoid "is" with a literal Python 3.8 warnings
commit403e11edbfad5da2e6d5842adc9222f60e76ee43
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 10 Oct 2019 12:21:54 +0000 (10 13:21 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 15 Oct 2019 08:47:16 +0000 (15 09:47 +0100)
tree751144dd83b609ece03796307c166f79457544a9
parentbd200384c515bdc84d52f1735c0fea43c8f61e11
trace: avoid "is" with a literal Python 3.8 warnings

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é <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191010122154.10553-1-stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
scripts/tracetool/__init__.py