]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vmbus_testing: fix wrong python syntax for integer value comparison
authorAni Sinha <anisinha@redhat.com>
Wed, 5 Jul 2023 13:44:07 +0000 (19:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:47:53 +0000 (09:47 +0200)
commite70a88462a9f69718b1312cc8c92a8e4bfaa9984
tree0496294e04be4b90c62709679c1420d17cefada3
parent15ebed8cb7947b75dd32805a77b7bc27d2b26ba1
vmbus_testing: fix wrong python syntax for integer value comparison

[ Upstream commit ed0cf84e9cc42e6310961c87709621f1825c2bb8 ]

It is incorrect in python to compare integer values using the "is" keyword.
The "is" keyword in python is used to compare references to two objects,
not their values. Newer version of python3 (version 3.8) throws a warning
when such incorrect comparison is made. For value comparison, "==" should
be used.

Fix this in the code and suppress the following warning:

/usr/sbin/vmbus_testing:167: SyntaxWarning: "is" with a literal. Did you mean "=="?

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Link: https://lore.kernel.org/r/20230705134408.6302-1-anisinha@redhat.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/hv/vmbus_testing