From 4fe89474798617615fbd3cf77d36034ff4e071ee Mon Sep 17 00:00:00 2001 From: Guillaume Chazarain Date: Sun, 24 Feb 2008 20:26:59 +0100 Subject: [PATCH] Remove unused return value: prefix --- pysize/core/deletion.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pysize/core/deletion.py b/pysize/core/deletion.py index 6c97fbe..fb1face 100644 --- a/pysize/core/deletion.py +++ b/pysize/core/deletion.py @@ -35,14 +35,14 @@ DELETED = deleted() @unexpect(OSError) def _iter_from_the_root(fullpath): - """If path is /a/b/c, iterates over /, /a, /a/b, /a/b/c and returns also + """If path is /a/b/c, iterates over /, /a, /a/b, /a/b/c and returns for each path the inodes dictionary in DEV_INO_TO_SUBTRACT as well as the inode number""" rebuilt = '/' for element in [''] + fullpath.strip('/').split('/'): rebuilt = os.path.join(rebuilt, element) dev, ino = get_dev_ino(rebuilt) - yield DEV_INO_TO_SUBTRACT.setdefault(dev, {}), ino, rebuilt + yield DEV_INO_TO_SUBTRACT.setdefault(dev, {}), ino @catches(OSError) def get_deletion_info(fullpath): @@ -53,7 +53,7 @@ def get_deletion_info(fullpath): subtracted = 0 if DEV_INO_TO_SUBTRACT: try: - for inodes, ino, prefix in _iter_from_the_root(fullpath): + for inodes, ino in _iter_from_the_root(fullpath): subtracted = inodes.get(ino, 0) if subtracted == 0: # Nothing to delete @@ -74,7 +74,7 @@ def _add_to_hash(fullpath): size = compute_size.slow(fullpath) dev, ino = get_dev_ino(fullpath) DEV_INO_TO_SUBTRACT.setdefault(dev, {})[ino] = DELETED - for inodes, ino, prefix in _iter_from_the_root(os.path.dirname(fullpath)): + for inodes, ino in _iter_from_the_root(os.path.dirname(fullpath)): inodes[ino] = inodes.get(ino, 0) + size # TODO: Deletion of hard links @@ -149,7 +149,7 @@ def restore(fullpath): TO_DELETE.remove(fullpath) del DEV_INO_TO_SUBTRACT[dev][ino] size = compute_size.slow(fullpath, account_deletion=False) - for inodes, ino, prefix in _iter_from_the_root(os.path.dirname(fullpath)): + for inodes, ino in _iter_from_the_root(os.path.dirname(fullpath)): if inodes[ino] == size: del inodes[ino] else: -- 2.11.4.GIT