From: Oleg Broytman Date: Sat, 11 Nov 2023 18:34:51 +0000 (+0300) Subject: Fix(Py3): Stop using module `string` X-Git-Tag: 5.0.0~60 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=e784339181e160ebaf4ee5e21e00c50712823421;p=bookmarks_db.git Fix(Py3): Stop using module `string` --- diff --git a/Storage/bkmk_stflad.py b/Storage/bkmk_stflad.py index 7f417b0..a4634fa 100644 --- a/Storage/bkmk_stflad.py +++ b/Storage/bkmk_stflad.py @@ -12,7 +12,6 @@ __license__ = "GNU GPL" __all__ = ['storage_flad'] -import string from m_lib.flad import fladm from bkmk_objects import Folder, Bookmark, Ruler, Walker @@ -24,8 +23,8 @@ class storage_flad(Walker): self.first_object = 1 def root_folder(self, f): - header = string.replace(f.header, ".", ".\n") - header = string.replace(header, "<", "\n<", 3)[1:] + header = f.header.replace(".", ".\n") + header = header.replace("<", "\n<", 3)[1:] header_file = open("header", 'w') header_file.write(header + "\n") header_file.write('

%s

\n\n' % f.name) @@ -88,10 +87,10 @@ Charset: %s header = header_file.read() header_file.close() - header = string.split(header, "\n") - root_folder.header = string.join(header[:5], '') + header = header.split("\n") + root_folder.header = header[:5].join('') root_folder.name = header[5][4:-5] - root_folder.comment = string.join(header[7:], '')[4:] + root_folder.comment = header[7:].join('')[4:] save_level = 0 got_folder = 1 # Start as if we already have one folder