From 742ce372d408094cf0e5cc6b0a11c93afda3e08b Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 2 Oct 2010 16:35:44 +0000 Subject: [PATCH] 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 --- Storage/bkmk_stjson.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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") -- 2.39.5