From: Thomas Jarosch Date: Sat, 25 Jan 2020 17:48:29 +0000 (+0100) Subject: Fix use of wrong 'i' variable name X-Git-Tag: v2.2~7^2~23 X-Git-Url: http://developer.intra2net.com/git/?p=python-delta-tar;a=commitdiff_plain;h=611c5d03c2a7b0193c0b7bd5fa23d414997464cd Fix use of wrong 'i' variable name pylint complained: tarfile.py:3797:38: E0602: Undefined variable 'i' (undefined-variable) Code was introduced like this in commit 27ee4dd4df48340541317123f5df348056c235ca Author: Philipp Gesang AuthorDate: Tue Aug 29 12:00:54 2017 +0200 implement volume handling for rescue mode When reconstructing the index, traverse backup volumes and set the “volume” member on the objects appropriately. -> I guess 'i' was renamed to nvol for better readability. --- diff --git a/deltatar/tarfile.py b/deltatar/tarfile.py index 06f4524..fa771aa 100644 --- a/deltatar/tarfile.py +++ b/deltatar/tarfile.py @@ -3794,7 +3794,7 @@ def gen_rescue_index (gen_volume_name, mode, maxvol=None, password=None, key=Non raise TarError ("no rescue handling for mode “%s”" % mode) except FileNotFoundError as exn: # volume does not exist - if maxvol is not None and i < maxvol: + if maxvol is not None and nvol < maxvol: continue # explicit volume number specified, ignore missing ones else: break