mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-28 20:04:23 +01:00
...
This commit is contained in:
parent
4b517acf38
commit
e1dc8a6157
1 changed files with 3 additions and 0 deletions
|
|
@ -113,6 +113,9 @@ def __init__(self, path_to_html_file, level, encoding, verbose, referrer=None):
|
|||
raise IOError(msg)
|
||||
raise IgnoreFile(msg, err.errno)
|
||||
|
||||
if not src:
|
||||
raise ValueError('The file %s is empty'%self.path)
|
||||
|
||||
if not self.is_binary:
|
||||
if not encoding:
|
||||
encoding = detect_xml_encoding(src[:4096], verbose=verbose)[1]
|
||||
|
|
|
|||
Loading…
Reference in a new issue