1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-21 13:41:30 +02:00

Another part of logging adaptation

This commit is contained in:
2021-06-24 19:57:47 +02:00
parent 6dfcaea2dd
commit 230fe90e69
9 changed files with 56 additions and 59 deletions
+2 -5
View File
@@ -6,10 +6,6 @@ import uuid
from ebook_converter.utils.filenames import ascii_text
__license__ = 'GPL v3'
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
def start_text(tag, prefix_len=0, top_level=True):
ans = tag.text or ''
limit = 50 - prefix_len
@@ -123,7 +119,8 @@ class LinksManager(object):
bmark = self.anchor_map[(href, self.top_anchor)]
return make_link(parent, anchor=bmark, tooltip=tooltip)
else:
self.log.warn('Ignoring internal hyperlink with href (%s) pointing to unknown destination' % url)
self.log.warning('Ignoring internal hyperlink with href (%s) '
'pointing to unknown destination', url)
if purl.scheme in {'http', 'https', 'ftp'}:
if url not in self.external_links:
self.external_links[url] = self.document_relationships.add_relationship(url, self.namespace.names['LINKS'], target_mode='External')