From 46d3bae2c944abb419055956997dbaf160427512 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 6 Mar 2008 03:55:43 +0000 Subject: [PATCH] Fix bug in setting RTF metadata --- src/libprs500/ebooks/metadata/rtf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libprs500/ebooks/metadata/rtf.py b/src/libprs500/ebooks/metadata/rtf.py index 9627b11e91..09ef7e601f 100644 --- a/src/libprs500/ebooks/metadata/rtf.py +++ b/src/libprs500/ebooks/metadata/rtf.py @@ -111,8 +111,9 @@ def create_metadata(stream, options): if options.category: category = options.category.encode('ascii', 'ignore') md += r'{\category %s}'%(category,) - if options.comment: - comment = options.comment.encode('ascii', 'ignore') + comp = options.comment if hasattr(options, 'comment') else options.comments + if comp: + comment = comp.encode('ascii', 'ignore') md += r'{\subject %s}'%(comment,) if len(md) > 6: md += '}'