mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
3abac8e7bb
commit
390e47bb4d
@ -15,7 +15,7 @@ import os, re, sys, errno as gerrno
|
|||||||
from calibre.ebooks.oeb.base import urlunquote
|
from calibre.ebooks.oeb.base import urlunquote
|
||||||
from calibre.ebooks.chardet import detect_xml_encoding
|
from calibre.ebooks.chardet import detect_xml_encoding
|
||||||
from calibre.constants import iswindows
|
from calibre.constants import iswindows
|
||||||
from calibre import unicode_path, as_unicode, replace_entities
|
from calibre import unicode_path, replace_entities
|
||||||
from polyglot.urllib import urlparse, urlunparse
|
from polyglot.urllib import urlparse, urlunparse
|
||||||
|
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ class HTMLFile:
|
|||||||
if not self.is_binary:
|
if not self.is_binary:
|
||||||
src += f.read()
|
src += f.read()
|
||||||
except OSError as err:
|
except OSError as err:
|
||||||
msg = 'Could not read from file: %s with error: %s'%(self.path, as_unicode(err))
|
msg = f'Could not read from file: {self.path} with error: {err}'
|
||||||
if level == 0:
|
if level == 0:
|
||||||
raise OSError(msg)
|
raise OSError(msg)
|
||||||
raise IgnoreFile(msg, err.errno)
|
raise IgnoreFile(msg, err.errno)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user