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:
|
try:
|
||||||
encoding, default_encoding = get_encoding(font,
|
encoding, default_encoding = get_encoding(font,
|
||||||
font_table, default_encoding, failed=failed)
|
font_table, default_encoding, failed=failed)
|
||||||
if encoding:
|
if not encoding:
|
||||||
out.append(chr(charcode).decode(encoding))
|
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
out.append(chr(charcode).decode(encoding))
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
failed = True
|
failed = True
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user