Skip to content

Commit 38ec576

Browse files
committed
fix(parser): favicon 필드 불필요한 경고 제거
SILENT_FALLBACK_FIELDS 조건문이 반전되어 있어 "조용히 처리"해야 할 필드에 오히려 경고가 생성되던 문제 수정. - spass_parser.py:214에 `not` 추가 - favicon 필드 변환 시 RAW_FIELD_FALLBACK 경고 더 이상 발생 안 함
1 parent 5968211 commit 38ec576

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/spass_csv_converter/spass_parser.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
class SPassParser:
1313
DEFAULT_TABLE_TYPES = ["passwords", "cards", "addresses", "notes"]
14+
SILENT_FALLBACK_FIELDS = frozenset({"favicon"})
15+
1416
TYPE_ALIASES = {
1517
"password": "passwords",
1618
"passwords": "passwords",
@@ -209,7 +211,8 @@ def _decode_field(
209211
raise SPassFormatError(
210212
f"Invalid base64/UTF-8 in table {table_number}, row {row_number}, field '{header}'"
211213
) from exc
212-
warnings.append(
214+
if header not in SPassParser.SILENT_FALLBACK_FIELDS:
215+
warnings.append(
213216
SPassWarning(
214217
code=WarningCode.RAW_FIELD_FALLBACK,
215218
message="Field was not valid base64/UTF-8 and was kept as raw text",
@@ -219,4 +222,4 @@ def _decode_field(
219222
field=header,
220223
)
221224
)
222-
return field
225+
return field

0 commit comments

Comments
 (0)