]> git.phdru.name Git - bookmarks_db.git/commitdiff
Minor optimization (free an object). Changed error message.
authorOleg Broytman <phd@phdru.name>
Sat, 2 Oct 2010 16:35:44 +0000 (16:35 +0000)
committerOleg Broytman <phd@phdru.name>
Sat, 2 Oct 2010 16:35:44 +0000 (16:35 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@288 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Storage/bkmk_stjson.py

index d44e1114a15a9705b794f6b78413e5800c1b08f9..077f89cfa6cceb1e7575cde3f2d5a154759dca8c 100644 (file)
@@ -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")