Re: [PATCH] vmbus_testing: fix wrong python syntax for integer value comparison

From: Wei Liu
Date: Sun Jul 23 2023 - 19:19:55 EST


On Mon, Jul 17, 2023 at 01:13:25PM +0530, Ani Sinha wrote:
>
>
> > On 05-Jul-2023, at 7:14 PM, Ani Sinha <anisinha@xxxxxxxxxx> wrote:
> >
> > 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 "=="?
>
> Ping …
>

Applied to hyperv-fixes. Thanks.