mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug in setting RTF metadata
This commit is contained in:
parent
442dc19956
commit
46d3bae2c9
@ -111,8 +111,9 @@ def create_metadata(stream, options):
|
|||||||
if options.category:
|
if options.category:
|
||||||
category = options.category.encode('ascii', 'ignore')
|
category = options.category.encode('ascii', 'ignore')
|
||||||
md += r'{\category %s}'%(category,)
|
md += r'{\category %s}'%(category,)
|
||||||
if options.comment:
|
comp = options.comment if hasattr(options, 'comment') else options.comments
|
||||||
comment = options.comment.encode('ascii', 'ignore')
|
if comp:
|
||||||
|
comment = comp.encode('ascii', 'ignore')
|
||||||
md += r'{\subject %s}'%(comment,)
|
md += r'{\subject %s}'%(comment,)
|
||||||
if len(md) > 6:
|
if len(md) > 6:
|
||||||
md += '}'
|
md += '}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user