From 253d9034c7aac05a7e7d73726cfca99d30821726 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 17 Jul 2015 14:09:03 +0530 Subject: [PATCH] Fix #1475538 [version attribute missing when converting to azw3 format](https://bugs.launchpad.net/calibre/+bug/1475538) --- src/calibre/ebooks/oeb/polish/check/opf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/polish/check/opf.py b/src/calibre/ebooks/oeb/polish/check/opf.py index 8f5620b071..7964af1b7b 100644 --- a/src/calibre/ebooks/oeb/polish/check/opf.py +++ b/src/calibre/ebooks/oeb/polish/check/opf.py @@ -237,7 +237,7 @@ def check_opf(container): 'The opf must have the root element in namespace {0}, like this: ')).format(OPF2_NS) errors.append(err) - elif container.opf.get('version') is None: + elif container.opf.get('version') is None and container.book_type == 'epub': err = BaseError(_('The OPF does not have a version'), container.opf_name, container.opf.sourceline) err.HELP = xml(_( 'The tag in the OPF must have a version attribute. This is usually version="2.0" for EPUB2 and AZW3 and version="3.0" for EPUB3'))