From 1556b1497a0763effb4464f31ad37e989e139876 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 24 Jan 2009 08:46:23 -0500 Subject: [PATCH] Fix authors_to_string error with NoneType objects --- src/calibre/ebooks/metadata/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/__init__.py b/src/calibre/ebooks/metadata/__init__.py index 05b624f811..856133d1ce 100644 --- a/src/calibre/ebooks/metadata/__init__.py +++ b/src/calibre/ebooks/metadata/__init__.py @@ -21,7 +21,10 @@ def string_to_authors(raw): return authors def authors_to_string(authors): - return ' & '.join([a.replace('&', '&&') for a in authors]) + if authors is not None: + return ' & '.join([a.replace('&', '&&') for a in authors]) + else: + return '' def author_to_author_sort(author): tokens = author.split()