From patchwork Thu Dec 14 19:27:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Ricardo Leitner X-Patchwork-Id: 10113209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0EC60602B3 for ; Thu, 14 Dec 2017 19:33:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E489929B71 for ; Thu, 14 Dec 2017 19:33:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6C4C29CE8; Thu, 14 Dec 2017 19:33:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Greylist: delayed 317 seconds by postgrey-1.34 at pdx-wl-mail.web.codeaurora.org; Thu, 14 Dec 2017 19:33:03 UTC Received: from bastion.fedoraproject.org (bastion01.fedoraproject.org [209.132.181.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 162E029B71 for ; Thu, 14 Dec 2017 19:33:02 +0000 (UTC) Received: from mailman01.phx2.fedoraproject.org (mailman01.phx2.fedoraproject.org [10.5.126.36]) by bastion01.phx2.fedoraproject.org (Postfix) with ESMTP id 7635360C1347; Thu, 14 Dec 2017 19:27:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 bastion01.phx2.fedoraproject.org 7635360C1347 Received: from mailman01.phx2.fedoraproject.org (localhost [IPv6:::1]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id 71B24228A94E9; Thu, 14 Dec 2017 19:27:45 +0000 (UTC) Received: by mailman01.phx2.fedoraproject.org (Postfix, from userid 991) id 6D0EF228A94E9; Thu, 14 Dec 2017 19:27:42 +0000 (UTC) Received: from smtp-mm-osuosl01.fedoraproject.org (smtp-mm-osuosl01.vpn.fedoraproject.org [192.168.1.23]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id 0C967228A94E8 for ; Thu, 14 Dec 2017 19:27:42 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by smtp-mm-osuosl01.fedoraproject.org (Postfix) with ESMTPS id B3A4998423 for ; Thu, 14 Dec 2017 19:27:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 342417CE14 for ; Thu, 14 Dec 2017 19:27:41 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-28.gru2.redhat.com [10.97.116.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B1C46E519 for ; Thu, 14 Dec 2017 19:27:40 +0000 (UTC) From: Marcelo Ricardo Leitner To: libteam@lists.fedorahosted.org Subject: [PATCH] examples: fix duplex comparison against best port Date: Thu, 14 Dec 2017 17:27:35 -0200 Message-Id: <272c39d5bbc396b421d62030c5cb69d9b749fee3.1513279655.git.mleitner@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 14 Dec 2017 19:27:41 +0000 (UTC) Message-ID-Hash: 6VR7TNFHQJC5M3HSTPVEOMPDWCTGSCSU X-Message-ID-Hash: 6VR7TNFHQJC5M3HSTPVEOMPDWCTGSCSU X-MailFrom: mleitner@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.0 Precedence: list List-Id: Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Marcelo R. Leitner Signed-off-by: Marcelo Ricardo Leitner --- examples/python/team_daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.3 diff --git a/examples/python/team_daemon.py b/examples/python/team_daemon.py index 476306ef9b24..2d2a74f2f961 100755 --- a/examples/python/team_daemon.py +++ b/examples/python/team_daemon.py @@ -146,7 +146,7 @@ class TeamDaemon(object): if port.linkup: if (not best or port.speed > best.speed or - (port.speed == best.speed and port.duplex > port.duplex)): + (port.speed == best.speed and port.duplex > best.duplex)): best = port if best: self._change_active_port(active, best)