From patchwork Mon Jun 6 07:25:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurucharan Shetty X-Patchwork-Id: 631057 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rNhNZ2Wtyz9t41 for ; Tue, 7 Jun 2016 03:22:54 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 7AB88108B4; Mon, 6 Jun 2016 10:22:28 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 6CFB4108B1 for ; Mon, 6 Jun 2016 10:22:26 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id EF7E4161152 for ; Mon, 6 Jun 2016 11:22:25 -0600 (MDT) X-ASG-Debug-ID: 1465233745-0b32373d1e239ed0001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar6.cudamail.com with ESMTP id ttryafxxkVWt80dh (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 06 Jun 2016 11:22:25 -0600 (MDT) X-Barracuda-Envelope-From: guru.ovn@gmail.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mail-pf0-f193.google.com) (209.85.192.193) by mx1-pf1.cudamail.com with ESMTPS (AES128-SHA encrypted); 6 Jun 2016 17:22:25 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at _netblocks.google.com designates 209.85.192.193 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.85.192.193 X-Barracuda-RBL-IP: 209.85.192.193 Received: by mail-pf0-f193.google.com with SMTP id z187so4055863pfz.2 for ; Mon, 06 Jun 2016 10:22:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=ei5QH1shQ1p44uU9YMPkCfFXP4iXzq4v0w2Axs2KPE0=; b=k7Qnab3btEEsBC6BHm77ZuRD54+hgM0hko1IpnwEGQawz9vEBeo4rsWp/R7QRT3YYl BOCzFuu3mHIl05o7pP2t4O6WYvhc5sV228M9kmbVVPbpY59MeCdP2L/kF7Vlz73bmyMc 3npludnjAAw8YKkibVF0u5jiF/T2dBFtm1W4y7Ks2c/g2iqT2Nul56iPeiptd7rxb9/Q eSpL2heoKzYeXt+tM1u8QDG6jY36qm7modH9o4jWKwvQFSNpdKE287LqKy4ILGJJAJ2l 1dyuMp0i9ShT5ozy+13lTN/12oVSA1wUF/G4aBNLI8U6NRYXfdODTAHmAL9pF2H2lOV2 5D2w== X-Gm-Message-State: ALyK8tLsJNcrtcPe62A6aWzfxo2Jt76QsJPmMd1QAN3IX9Mz6Jpr/Wmi8HP6YIVLHu9Jyg== X-Received: by 10.98.103.7 with SMTP id b7mr26251166pfc.19.1465233744454; Mon, 06 Jun 2016 10:22:24 -0700 (PDT) Received: from ubuntu.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id o1sm26701289pax.24.2016.06.06.10.22.18 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Jun 2016 10:22:19 -0700 (PDT) X-CudaMail-Envelope-Sender: guru.ovn@gmail.com From: Gurucharan Shetty To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-605047061 X-CudaMail-DTE: 060616 X-CudaMail-Originating-IP: 209.85.192.193 Date: Mon, 6 Jun 2016 00:25:56 -0700 X-ASG-Orig-Subj: [##CM-E1-605047061##][PATCH 5/8] ovs-bugtool.in: Test for membership should be 'not in'. Message-Id: <1465197959-27853-6-git-send-email-guru@ovn.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465197959-27853-1-git-send-email-guru@ovn.org> References: <1465197959-27853-1-git-send-email-guru@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1465233745 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 5/8] ovs-bugtool.in: Test for membership should be 'not in'. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Gurucharan Shetty --- utilities/bugtool/ovs-bugtool.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in index 95ea482..ced74a9 100755 --- a/utilities/bugtool/ovs-bugtool.in +++ b/utilities/bugtool/ovs-bugtool.in @@ -334,7 +334,7 @@ def collect_data(): cap = v['cap'] if 'cmd_args' in v: v['output'] = StringIOmtime() - if not cap in process_lists: + if cap not in process_lists: process_lists[cap] = [] process_lists[cap].append( ProcOutput(v['cmd_args'], caps[cap][MAX_TIME], v['output'], @@ -824,7 +824,7 @@ def fd_usage(cap): name = fh.readline() num_fds = len(os.listdir(os.path.join('/proc/' + d + '/fd'))) if num_fds > 0: - if not num_fds in fd_dict: + if num_fds not in fd_dict: fd_dict[num_fds] = [] fd_dict[num_fds].append(name.replace('\0', ' ').strip()) finally: @@ -873,7 +873,7 @@ def load_plugins(just_capabilities=False, filter=None): for dir in [d for d in os.listdir(PLUGIN_DIR) if os.path.isdir(os.path.join(PLUGIN_DIR, d))]: - if not dir in caps: + if dir not in caps: if not os.path.exists("%s/%s.xml" % (PLUGIN_DIR, dir)): continue xmldoc = parse("%s/%s.xml" % (PLUGIN_DIR, dir))