Mercurial > gnulib
changeset 39082:a06a78a888ab
vfs: eliminate weird pylint warning
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Tue, 05 Dec 2017 21:13:16 +0300 |
parents | d2c0653203ad |
children | 23d338c99b61 |
files | pygnulib/vfs.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib/vfs.py Tue Dec 05 21:12:50 2017 +0300 +++ b/pygnulib/vfs.py Tue Dec 05 21:13:16 2017 +0300 @@ -137,13 +137,13 @@ def backup(root, name): """Backup the given file.""" root = Base(".") if root is None else root - path = _os.path.join(root.absolute, root[name]) - backup = "{}~".format(path) + original_path = _os.path.join(root.absolute, root[name]) + backup_path = "{}~".format(original_path) try: - _os.unlink(backup) + _os.unlink(backup_path) except FileNotFoundError: pass # ignore non-existent files - _os.rename(path, backup) + _os.rename(original_path, backup_path) def compare(lhs_root, lhs_name, rhs_root, rhs_name):