From b1f4e6d15c61b31f7f1e40dfd2ff99bc2b1119d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 11 May 2015 02:31:56 +0200 Subject: [PATCH] backup: fix missing 'unused' variables Actually the 'vm' variable is used - in eval'ed statement. --- core/backup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/backup.py b/core/backup.py index 42dd29d9..92280a7c 100644 --- a/core/backup.py +++ b/core/backup.py @@ -1904,6 +1904,8 @@ def backup_restore_print_summary(restore_info, print_callback=print_stdout): fields[f]["max_width"] = len(f) for vm_info in restore_info.values(): if 'vm' in vm_info.keys(): + # noinspection PyUnusedLocal + vm = vm_info['vm'] l = len(unicode(eval(fields[f]["func"]))) if l > fields[f]["max_width"]: fields[f]["max_width"] = l @@ -1934,6 +1936,8 @@ def backup_restore_print_summary(restore_info, print_callback=print_stdout): # Skip non-VM here if 'vm' not in vm_info: continue + # noinspection PyUnusedLocal + vm = vm_info['vm'] s = "" for f in fields_to_display: fmt = "{{0:>{0}}} |".format(fields[f]["max_width"] + 1)