X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=storage.py;h=9c806e43f97933705383d114ed363ae2b5bc2722;hb=1bc3f08921176ba39efd7f698cea9b3d4ae49765;hp=09243015ebcc8f111dfa6983d94e64b13bed36aa;hpb=fb5c3b2b91aeeb615d6d6d890491af3fdff69556;p=bookmarks_db.git diff --git a/storage.py b/storage.py index 0924301..9c806e4 100644 --- a/storage.py +++ b/storage.py @@ -1,10 +1,20 @@ -""" - Thin wrapper for module Storage. Provides "default" storage +"""Thin wrapper for module Storage. Provides "default" storage + +This file is a part of Bookmarks database and Internet robot. + """ +__author__ = "Oleg Broytman " +__copyright__ = "Copyright (C) 1997-2014 PhiloSoft Design" +__license__ = "GNU GPL" + +__all__ = ['import_storage', 'storage'] + from os import environ -storage_name = environ.get("BKMK_STORAGE", "pickle") +from bkmk_objects import parse_params, set_params + +storage_name, storage_params = parse_params(environ.get("BKMK_STORAGE", "pickle")) def import_storage(storage_name): exec "from Storage import bkmk_st%s" % storage_name @@ -12,3 +22,4 @@ def import_storage(storage_name): return storage storage = import_storage(storage_name) +set_params(storage, storage_params)