From patchwork Mon Oct 10 12:04:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lakshmipathi.G" X-Patchwork-Id: 9369389 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 07651607D2 for ; Mon, 10 Oct 2016 12:05:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED34329568 for ; Mon, 10 Oct 2016 12:05:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E11D5297C2; Mon, 10 Oct 2016 12:05:29 +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 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5634E29781 for ; Mon, 10 Oct 2016 12:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057AbcJJMFZ (ORCPT ); Mon, 10 Oct 2016 08:05:25 -0400 Received: from smtpq5.tb.mail.iss.as9143.net ([212.54.42.168]:56431 "EHLO smtpq5.tb.mail.iss.as9143.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbcJJMFZ (ORCPT ); Mon, 10 Oct 2016 08:05:25 -0400 Received: from [212.54.42.118] (helo=lsmtp4.tb.mail.iss.as9143.net) by smtpq5.tb.mail.iss.as9143.net with esmtp (Exim 4.82) (envelope-from ) id 1btZKc-0004Cv-QX for linux-btrfs@vger.kernel.org; Mon, 10 Oct 2016 14:05:22 +0200 Received: from 31-151-236-204.dynamic.upc.nl ([31.151.236.204] helo=webminal.org) by lsmtp4.tb.mail.iss.as9143.net with esmtp (Exim 4.82) (envelope-from ) id 1btZKS-00086q-N1 for linux-btrfs@vger.kernel.org; Mon, 10 Oct 2016 14:05:22 +0200 Received: from localhost.localdomain (fedori [127.0.0.1]) by webminal.org (8.14.4/8.14.4) with ESMTP id u9AC56tO001526 for ; Mon, 10 Oct 2016 14:05:16 +0200 Received: (from laks@localhost) by localhost.localdomain (8.14.4/8.14.4/Submit) id u9AC4tcq001199 for linux-btrfs@vger.kernel.org; Mon, 10 Oct 2016 14:04:55 +0200 Date: Mon, 10 Oct 2016 14:04:55 +0200 From: "Lakshmipathi.G" To: linux-btrfs@vger.kernel.org Subject: [PATCH]btrfs-progs: btrfs-debugfs: cleanup unused variables reported by pylint Message-ID: <20161010120455.GA32406@fedori> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.1 cv=OfVldUnY c=1 sm=0 tr=0 a=kj9zAlcOel0A:10 a=MKtGQD3n3ToA:10 a=CH0kA5CcgfcA:10 a=DT0QyOUopAkA:10 a=ZZnuYtJkoWoA:10 a=Ii29zHd6AAAA:8 a=fOq8tdAizineXM1m_2UA:9 a=CjuIK1q_8ugA:10 a=hUl28ISp9AlOTif-od5a:22 xcat=Undefined/Undefined none X-Ziggo-Spam-Status: No Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Lakshmipathi.G --- btrfs-debugfs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/btrfs-debugfs b/btrfs-debugfs index 0a654a6..dfb8853 100755 --- a/btrfs-debugfs +++ b/btrfs-debugfs @@ -4,7 +4,7 @@ # LGPLv2 license # Copyright Facebook 2014 -import sys,os,struct,fcntl,ctypes,stat,argparse +import sys, os, fcntl, ctypes, stat, argparse # helpers for max ints maxu64 = (1L << 64) - 1 @@ -233,7 +233,6 @@ def print_file_extents(filename): s.args.min_objectid = st.st_ino s.args.max_objectid = st.st_ino - size = st.st_size while True: try: @@ -314,7 +313,7 @@ def print_block_groups(mountpoint): try: fd = os.open(mountpoint, os.O_RDONLY) - st = os.fstat(fd) + os.fstat(fd) except Exception, e: sys.stderr.write("Failed to open %s (%s)\n" % (mountpoint, e)) return -1 @@ -336,7 +335,7 @@ def print_block_groups(mountpoint): h = ctypes.addressof(header) p_left = args_buffer_size - for x in xrange(0, s.args.nr_items): + for _ in xrange(0, s.args.nr_items): # for each itme, copy the header from the buffer into # our header struct ctypes.memmove(h, p, header_size)