Message ID | 20190913172903.9464-2-aconole@redhat.com |
---|---|
State | Accepted |
Commit | 78e2a56927b5ba7e6f8808e3cf967171a2708a57 |
Headers | show |
Series | [ovs-dev,1/3] ovs-check-dead-ifs: python3 print format | expand |
On Fri, Sep 13, 2019 at 01:29:02PM -0400, Aaron Conole wrote: > The pid variable is being shadowed by the list comprehension in the > os.execvp() call. This can generate flakes / warnings in some environments > so fix it. > > Signed-off-by: Aaron Conole <aconole@redhat.com> LGTM, tested on my machine and solve the flake8 error. Acked-by: William Tu <u9012063@gmail.com> > --- > utilities/ovs-check-dead-ifs.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in > index f398a3401..73e4fd9e1 100755 > --- a/utilities/ovs-check-dead-ifs.in > +++ b/utilities/ovs-check-dead-ifs.in > @@ -99,4 +99,4 @@ if bad_pids: > The following processes are listening for packets to arrive on network devices > that no longer exist. You may want to restart them.""") > sys.stdout.flush() > - os.execvp("ps", ["ps"] + ["%s" % pid for pid in bad_pids]) > + os.execvp("ps", ["ps"] + ["%s" % pspid for pspid in bad_pids]) > -- > 2.21.0 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff --git a/utilities/ovs-check-dead-ifs.in b/utilities/ovs-check-dead-ifs.in index f398a3401..73e4fd9e1 100755 --- a/utilities/ovs-check-dead-ifs.in +++ b/utilities/ovs-check-dead-ifs.in @@ -99,4 +99,4 @@ if bad_pids: The following processes are listening for packets to arrive on network devices that no longer exist. You may want to restart them.""") sys.stdout.flush() - os.execvp("ps", ["ps"] + ["%s" % pid for pid in bad_pids]) + os.execvp("ps", ["ps"] + ["%s" % pspid for pspid in bad_pids])
The pid variable is being shadowed by the list comprehension in the os.execvp() call. This can generate flakes / warnings in some environments so fix it. Signed-off-by: Aaron Conole <aconole@redhat.com> --- utilities/ovs-check-dead-ifs.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)