]> git.phdru.name Git - bookmarks_db.git/blobdiff - Storage/bkmk_stpickle.py
Cleanup code: use 4 spaces
[bookmarks_db.git] / Storage / bkmk_stpickle.py
index 2ed61d3f5c72845e191f6e53a3df4598c7089eaa..2598cf6a7453e20c7b5f1c38b91e116436abd196 100644 (file)
@@ -1,31 +1,35 @@
-"""
-   Bookmarks storage manager - pickle; certainly the most simple and elegant :)
+"""Bookmarks storage manager - pickle; certainly the most simple and elegant :)
+
+This file is a part of Bookmarks database and Internet robot.
 
-   Written by BroytMann, Feb 2000 - Mar 2000. Copyright (C) 2000 PhiloSoft Design
 """
 
+__author__ = "Oleg Broytman <phd@phdru.name>"
+__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design"
+__license__ = "GNU GPL"
 
-try:
-   import cPickle
-   pickle = cPickle
+__all__ = ['storage_pickle']
 
-except ImportError:
-   import pickle
 
+try:
+    import cPickle
+    pickle = cPickle
 
-class storage_pickle:
-   filename = "bookmarks_db.pickle"
+except ImportError:
+    import pickle
 
 
-   def store(self, root_folder):
-      outfile = open(self.filename, 'wb')
-      pickle.dump(root_folder, outfile, 1)
-      outfile.close()
+class storage_pickle(object):
+    filename = "bookmarks_db.pickle"
 
+    def store(self, root_folder):
+        outfile = open(self.filename, 'wb')
+        pickle.dump(root_folder, outfile, 1)
+        outfile.close()
 
-   def load(self):
-      infile = open(self.filename, 'rb')
-      root_folder = pickle.load(infile)
-      infile.close()
+    def load(self):
+        infile = open(self.filename, 'rb')
+        root_folder = pickle.load(infile)
+        infile.close()
 
-      return root_folder
+        return root_folder