mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-02 15:17:35 +01:00
py3: decode uuid4().hex using python3-compatible syntax
Also skip the additional uuid import, as it is already imported at the top of the file.
This commit is contained in:
parent
75d3542287
commit
8c6698abf7
1 changed files with 2 additions and 3 deletions
|
|
@ -85,7 +85,7 @@ def __init__(self, mobi6_reader, log, for_tweak=False):
|
|||
|
||||
def __call__(self):
|
||||
self.mobi6_reader.check_for_drm()
|
||||
self.aid_anchor_suffix = bytes(uuid4().hex)
|
||||
self.aid_anchor_suffix = uuid4().hex.encode('utf-8')
|
||||
bh = self.mobi6_reader.book_header
|
||||
if self.mobi6_reader.kf8_type == 'joint':
|
||||
offset = self.mobi6_reader.kf8_boundary + 2
|
||||
|
|
@ -225,8 +225,7 @@ def build_parts(self):
|
|||
self.parts.append(skeleton)
|
||||
if divcnt < 1:
|
||||
# Empty file
|
||||
import uuid
|
||||
aidtext = str(uuid.uuid4())
|
||||
aidtext = str(uuid4())
|
||||
filename = aidtext + '.html'
|
||||
self.partinfo.append(Part(skelnum, 'text', filename, skelpos,
|
||||
baseptr, aidtext))
|
||||
|
|
|
|||
Loading…
Reference in a new issue