From: Oleg Broytman Date: Sat, 2 Oct 2010 16:35:44 +0000 (+0000) Subject: Minor optimization (free an object). Changed error message. X-Git-Tag: v4.5.3~88 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=742ce372d408094cf0e5cc6b0a11c93afda3e08b;p=bookmarks_db.git Minor optimization (free an object). Changed error message. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@288 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Storage/bkmk_stjson.py b/Storage/bkmk_stjson.py index d44e111..077f89c 100644 --- a/Storage/bkmk_stjson.py +++ b/Storage/bkmk_stjson.py @@ -108,6 +108,7 @@ class storage_json(Walker): # Work around a bug in Mozilla - remove the trailing comma bkmk_s = bkmk_s.strip().replace(',]', ']') bookmarks_dict = json.loads(bkmk_s) + del bkmk_s root_folder = Folder() root_folder.header = '' @@ -125,7 +126,7 @@ class storage_json(Walker): def load_folder(self, folder, fdict): if fdict["type"] != "text/x-moz-place-container": - raise ValueError("Root object is not a Mozilla container") + raise ValueError("The object is not a Mozilla container") folder.id = fdict["id"] folder.index = fdict.get("index")