mirror of
https://github.com/borgbase/vorta
synced 2024-12-22 07:43:09 +00:00
Log json diff line parsing errors. By @real-yfprojects (#1369)
This commit is contained in:
parent
e53aa966fc
commit
305db92d4a
1 changed files with 4 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
|
||||
|
@ -14,6 +15,8 @@
|
|||
uifile = get_asset('UI/diffresult.ui')
|
||||
DiffResultUI, DiffResultBase = uic.loadUiType(uifile)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DiffResult(DiffResultBase, DiffResultUI):
|
||||
def __init__(self, fs_data, archive_newer, archive_older, json_lines):
|
||||
|
@ -123,6 +126,7 @@ def parse_diff_json_lines(diffs):
|
|||
|
||||
if not change_type:
|
||||
# either no changes, or unrecognized change(s)
|
||||
logger.error(f"Error parsing diff line {json.dumps(item)}")
|
||||
raise ValueError(f"Unknown change type {change['type']}")
|
||||
|
||||
files_with_attributes.append((size, change_type, name, dirpath, file_type))
|
||||
|
|
Loading…
Reference in a new issue