From d584a95114b3d37e46b1701d60a986212a105ecb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 5 May 2012 17:57:18 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/html/input.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/html/input.py b/src/calibre/ebooks/html/input.py index 06823140a6..c2ec6f9bce 100644 --- a/src/calibre/ebooks/html/input.py +++ b/src/calibre/ebooks/html/input.py @@ -114,7 +114,9 @@ class HTMLFile(object): raise IgnoreFile(msg, err.errno) if not src: - raise ValueError('The file %s is empty'%self.path) + if level == 0: + raise ValueError('The file %s is empty'%self.path) + self.is_binary = True if not self.is_binary: if not encoding: