Skip to content

Commit 8b57156

Browse files
committed
fix: potential bug in error handling, closes #26
1 parent 5cf70e8 commit 8b57156

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/26.fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix possible bug in error handling

src/rtfparse/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def parse_file(self) -> entities.Group:
9393
self.parsed = entities.Group(encoding, file)
9494
except Exception as err:
9595
logger.exception(err)
96-
self.parsed == Namespace()
96+
self.parsed = Namespace()
9797
self.parsed.structure = list()
9898
finally:
9999
if self.rtf_path is not None:

0 commit comments

Comments
 (0)