1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-14 17:43:31 +02:00

Finalizing logging transition.

This commit is contained in:
2021-06-24 20:31:37 +02:00
parent 230fe90e69
commit 0a9536b180
16 changed files with 74 additions and 94 deletions

View File

@@ -215,8 +215,8 @@ class BookHeader(object):
}[self.codepage]
except (IndexError, KeyError):
self.codec = 'cp1252' if not user_encoding else user_encoding
log.warn('Unknown codepage %d. Assuming %s' % (self.codepage,
self.codec))
log.warning('Unknown codepage %d. Assuming %s', self.codepage,
self.codec)
# Some KF8 files have header length == 264 (generated by kindlegen
# 2.9?). See https://bugs.launchpad.net/bugs/1179144
max_header_length = 500 # We choose 500 for future versions of kindlegen