From 9e45a0dda4cfa26b531a423fc8b1c4b10d382a0f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 8 Sep 2014 15:55:34 -0400 Subject: Refactor the data store a bit Reduce code duplication, and clearly separates admin and user dbs. Move plugin wrapper away and let plugin code use native functions. This patch also changes the indexed data to use a uuid and assumes 2 identical uuid cannot be created concurrently. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/install/ipsilon-server-install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipsilon/install/ipsilon-server-install') diff --git a/ipsilon/install/ipsilon-server-install b/ipsilon/install/ipsilon-server-install index e088b39..598a025 100755 --- a/ipsilon/install/ipsilon-server-install +++ b/ipsilon/install/ipsilon-server-install @@ -21,7 +21,7 @@ from ipsilon.login.common import LoginMgrsInstall from ipsilon.info.common import InfoProviderInstall from ipsilon.providers.common import ProvidersInstall from ipsilon.helpers.common import EnvHelpersInstall -from ipsilon.util.data import Store +from ipsilon.util.data import UserStore from ipsilon.tools import files import ConfigParser import argparse @@ -144,7 +144,7 @@ def install(plugins, args): users_db = cherrypy.config['user.prefs.db'] if os.path.exists(users_db): shutil.move(users_db, '%s.backup.%s' % (users_db, now)) - db = Store() + db = UserStore() db.save_user_preferences(args['admin_user'], {'is_admin': 1}) logger.info('Configuring environment helpers') -- cgit