Skip to content

Commit 1df01f8

Browse files
Lakshmipathikdave
authored andcommitted
btrfs-progs: btrfs-debugfs: cleanup unused variables reported by pylint
Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e0c9793 commit 1df01f8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

btrfs-debugfs

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# LGPLv2 license
55
# Copyright Facebook 2014
66

7-
import sys,os,struct,fcntl,ctypes,stat,argparse
7+
import sys, os, fcntl, ctypes, stat, argparse
88

99
# helpers for max ints
1010
maxu64 = (1L << 64) - 1
@@ -233,7 +233,6 @@ def print_file_extents(filename):
233233
s.args.min_objectid = st.st_ino
234234
s.args.max_objectid = st.st_ino
235235

236-
size = st.st_size
237236

238237
while True:
239238
try:
@@ -314,7 +313,7 @@ def print_block_groups(mountpoint):
314313

315314
try:
316315
fd = os.open(mountpoint, os.O_RDONLY)
317-
st = os.fstat(fd)
316+
os.fstat(fd)
318317
except Exception, e:
319318
sys.stderr.write("Failed to open %s (%s)\n" % (mountpoint, e))
320319
return -1
@@ -336,7 +335,7 @@ def print_block_groups(mountpoint):
336335
h = ctypes.addressof(header)
337336
p_left = args_buffer_size
338337

339-
for x in xrange(0, s.args.nr_items):
338+
for _ in xrange(0, s.args.nr_items):
340339
# for each itme, copy the header from the buffer into
341340
# our header struct
342341
ctypes.memmove(h, p, header_size)

0 commit comments

Comments
 (0)