From c654d23ff086b3d15d5a1544338faf596b81bd8b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 2 Jul 2008 06:42:58 -0700 Subject: [PATCH] fb2-meta shouldn't fail when the fb2 file has no series information --- src/calibre/ebooks/metadata/fb2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/metadata/fb2.py b/src/calibre/ebooks/metadata/fb2.py index b3337ac62a..5bffb47409 100644 --- a/src/calibre/ebooks/metadata/fb2.py +++ b/src/calibre/ebooks/metadata/fb2.py @@ -21,11 +21,11 @@ def get_metadata(stream): if comments and len(comments) > 1: comments = comments.p.contents[0] series = soup.find("sequence") - series_name = series['name'] # series_index = series.index mi = MetaInformation(title, author) mi.comments = comments - mi.category = series_name + if series: + mi.series = series.get('name', None) # mi.series_index = series_index return mi