forked from openlp/openlp
Reduced some code
This commit is contained in:
parent
98d2247f10
commit
bde8df5f86
@ -581,10 +581,9 @@ def strip_rtf(text, default_encoding=None):
|
||||
try:
|
||||
encoding, default_encoding = get_encoding(font,
|
||||
font_table, default_encoding, failed=failed)
|
||||
if encoding:
|
||||
out.append(chr(charcode).decode(encoding))
|
||||
else:
|
||||
if not encoding:
|
||||
return None
|
||||
out.append(chr(charcode).decode(encoding))
|
||||
except UnicodeDecodeError:
|
||||
failed = True
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user