mirror of
https://github.com/borgbase/vorta
synced 2025-01-03 05:36:19 +00:00
Fix spelling mistake in variable (#360)
This commit is contained in:
parent
47739b9663
commit
bf7185c5f2
1 changed files with 14 additions and 14 deletions
|
@ -30,30 +30,30 @@ def __init__(self, fs_data, archive_newer, archive_older):
|
|||
def parse_line(line):
|
||||
|
||||
if line:
|
||||
line_splitted = line.split()
|
||||
line_split = line.split()
|
||||
else:
|
||||
return 0, "", "", ""
|
||||
|
||||
if line_splitted[0] == 'added' or line_splitted[0] == 'removed':
|
||||
change_type = line_splitted[0]
|
||||
size = line_splitted[1]
|
||||
unit = line_splitted[2]
|
||||
if line_split[0] == 'added' or line_split[0] == 'removed':
|
||||
change_type = line_split[0]
|
||||
size = line_split[1]
|
||||
unit = line_split[2]
|
||||
else:
|
||||
change_type = "modified"
|
||||
size = line_splitted[0]
|
||||
unit = line_splitted[1]
|
||||
size = line_split[0]
|
||||
unit = line_split[1]
|
||||
# If present remove '+' or '-' sign at the front
|
||||
if '+' in size or '-' in size:
|
||||
size = size[1:]
|
||||
|
||||
if line_splitted[0].startswith("["):
|
||||
if line_split[0].startswith("["):
|
||||
size = 0
|
||||
change_type = line[:line.find(line_splitted[3])]
|
||||
full_path = line[line.find(line_splitted[3]):]
|
||||
change_type = line[:line.find(line_split[3])]
|
||||
full_path = line[line.find(line_split[3]):]
|
||||
dir, name = os.path.split(full_path)
|
||||
# add to nested dict of folders to find nested dirs.
|
||||
d = get_dict_from_list(nested_file_list, full_path.split('/'))
|
||||
elif line_splitted[1] not in ['directory', 'link']:
|
||||
elif line_split[1] not in ['directory', 'link']:
|
||||
if unit == 'B':
|
||||
size = int(size)
|
||||
elif unit == 'kB':
|
||||
|
@ -66,9 +66,9 @@ def parse_line(line):
|
|||
size = int(float(size) * 10**12)
|
||||
|
||||
if change_type == 'added' or change_type == 'removed':
|
||||
full_path = line[line.find(line_splitted[3]):]
|
||||
full_path = line[line.find(line_split[3]):]
|
||||
elif change_type == "modified":
|
||||
full_path = line[line.find(line_splitted[4]):]
|
||||
full_path = line[line.find(line_split[4]):]
|
||||
|
||||
dir, name = os.path.split(full_path)
|
||||
# add to nested dict of folders to find nested dirs.
|
||||
|
@ -77,7 +77,7 @@ def parse_line(line):
|
|||
d[name] = {}
|
||||
else:
|
||||
size = 0
|
||||
full_path = line[line.find(line_splitted[2]):]
|
||||
full_path = line[line.find(line_split[2]):]
|
||||
|
||||
dir, name = os.path.split(full_path)
|
||||
# add to nested dict of folders to find nested dirs.
|
||||
|
|
Loading…
Reference in a new issue